diff --git a/README.md b/README.md index 3eef92d..370ecbf 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@ # Miracode -[![Github all releases](https://img.shields.io/github/downloads/IdreesInc/Monocraft/total.svg)](https://GitHub.com/IdreesInc/Miracode/releases/) +[![Github all releases](https://img.shields.io/github/downloads/IdreesInc/Miracode/total.svg)](https://GitHub.com/IdreesInc/Miracode/releases/) ![](https://img.shields.io/github/license/IdreesInc/Miracode) [![](https://img.shields.io/github/v/release/IdreesInc/Miracode)](https://GitHub.com/IdreesInc/Miracode/releases/) -![](images/preview.png) +![](images/miracode-banner.png) -The monospaced font for developers who like Minecraft a bit _too_ much. - -*Notice: This project is not affiliated with Minecraft or Mojang in any way and is exclusively a fan project. This font emulates the typeface of the font used in the Minecraft UI, but it does not include any assets or font files from the original game.* +The font for those who like [Monocraft](https://github.com/IdreesInc/Monocraft) but actually want to be able to read what they type! ## Features -- Minecraft! - - The characters in this font were based around the [typeface](https://github.com/IdreesInc/Minecraft-Font) used in the Minecraft UI, with each glyph updated for better readability and spacing -- Monospaced! +- Like Monocraft, but readable! + - The characters in this font are based on [Monocraft](https://github.com/IdreesInc/Monocraft) which is based on the typeface used in the Minecraft UI - Each of the 1500+ glyphs included in this font have been carefully redesigned to work in a monospaced font - Thin characters like "i" and "l" have been reworked with tasteful tails and serifs to look better in a monospaced environment +- Angular! + - Miracode uses a special algorithm to convert the pixels that make up each character into a series of lines and curves. This gives each character a unique, angular look that is sure to make your code stand out - Programming ligatures! - Add some spice to your programming life with all new ligature characters - Arrows now look like arrows and comparison operators are easier to see at a glance + - Plus, Miracode includes some ligatures that are not available in Monocraft such as a ligature for "TODO:" and "NOTE:" ## Glyphs @@ -29,49 +29,39 @@ The monospaced font for developers who like Minecraft a bit _too_ much. ### Windows -Download the most recent `Monocraft.ttf` file from the [Releases](https://github.com/IdreesInc/Monocraft/releases) page. Right click on the downloaded font and select **Install**. You might need administrative access to install fonts, depending on your machine. +Download the most recent `Miracode.ttf` file from the [Releases](https://github.com/IdreesInc/Miracode/releases) page. Right click on the downloaded font and select **Install**. You might need administrative access to install fonts, depending on your machine. ### Mac -#### Using Homebrew + -#### Manually + -Download the most recent `Monocraft.ttf` file from the [Releases](https://github.com/IdreesInc/Monocraft/releases) page. Double click on the downloaded font file and select **Install Font** in the window that appears. More help available [here](https://support.apple.com/en-us/HT201749). +Download the most recent `Miracode.ttf` file from the [Releases](https://github.com/IdreesInc/Miracode/releases) page. Double click on the downloaded font file and select **Install Font** in the window that appears. More help available [here](https://support.apple.com/en-us/HT201749). ### Linux -Download the most recent `Monocraft.ttf` file from the [Releases](https://github.com/IdreesInc/Monocraft/releases) page. Move the file to ~/.local/share/fonts (create the folder if it doesn't already exist). In a terminal, run `fc-cache -fv`. Alternatively, log out and log in again. +Download the most recent `Miracode.ttf` file from the [Releases](https://github.com/IdreesInc/Miracode/releases) page. Move the file to ~/.local/share/fonts (create the folder if it doesn't already exist). In a terminal, run `fc-cache -fv`. Alternatively, log out and log in again. ## How to use -After following the installation instructions up above, simply select the "Monocraft" font (note the space) in any application that supports custom fonts. You might need to restart the application or your computer for the font to appear. +After following the installation instructions up above, simply select the "Miracode" font (note the space) in any application that supports custom fonts. You might need to restart the application or your computer for the font to appear. ## FAQ ### What ligatures are available? -So far, the following ligatures have been added to the font: - -And with the contributions of [@Ciubix8513](https://github.com/Ciubix8513), Monocraft now includes continuous ligatures that enable you to type arrows and lines that _just keep going_. - -If there is another character combination that you feel could be a ligature, feel free to create an issue! - ### How are these characters generated? -Using [FontForge's](https://fontforge.org/en-US/) excellent Python extension, the glyphs are created from configuration files representing each character's pixels. Diacritics are created separately and are combined with the original characters to create over 500 unique glyphs. To learn more, check out the source code in the [src](https://github.com/IdreesInc/Monocraft/tree/main/src) folder. - -### Do you have a version with the original Minecraft font (not monospaced)? - -I've got you covered, check out my rendition of the Minecraft typeface [here](https://github.com/IdreesInc/Minecraft-Font). +Using [FontForge's](https://fontforge.org/en-US/) excellent Python extension, the glyphs are created from configuration files representing each character's pixels. Diacritics are created separately and are combined with the original characters to create over 1500 unique glyphs. To learn more, check out the source code in the [src](https://github.com/IdreesInc/Miracode/tree/main/src) folder. -### What if I want to use a font that's actually good? +### How do I contribute? -Understandable, check out [Fira Code](https://github.com/tonsky/FiraCode) for a font with amazing attention to detail, or [Scientifica](https://github.com/nerdypepper/scientifica) for a bitmap font similar to this. +Unlike Monocraft, this font was made specifically with my use cases in mind and as such includes more weird features that Monocraft lacks. If you have any suggestions or improvements, feel free to open an issue or a pull request, but I can't guarantee that I'll accept every change! \ No newline at end of file diff --git a/examples/glyphs.txt b/examples/glyphs.txt index 4785c8f..51ea3e0 100644 --- a/examples/glyphs.txt +++ b/examples/glyphs.txt @@ -1,4 +1,4 @@ ---- Monocraft --- +--- Miracode --- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z @@ -6,56 +6,50 @@ a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ -¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ -Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Ā ā -Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Ē ē Ĕ ĕ Ė ė Ę ę Ě ě Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ĩ ĩ Ī ī Ĭ ĭ İ IJ ij Ĵ ĵ Ķ ķ ĸ -Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ń ń Ņ ņ Ň ň Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ř ř Ś ś Ŝ ŝ Ş ş Š š Ť ť Ũ ũ Ū ū Ŭ ŭ Ů ů Ű ű Ŵ ŵ -Ŷ ŷ Ÿ Ź ź Ż ż Ž +¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý +Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď ď Ē ē Ĕ ĕ Ė ė Ę ę Ě ě +Ĝ ĝ Ğ ğ Ġ ġ Ģ ģ Ĥ ĥ Ĩ ĩ Ī ī Ĭ ĭ İ IJ ij Ĵ ĵ Ķ ķ ĸ Ĺ ĺ Ļ ļ Ľ ľ Ł ł Ń ń Ņ ņ Ň ň Ō ō Ŏ ŏ Ő ő Œ œ Ŕ ŕ Ř ř Ś ś Ŝ ŝ Ş ş Š š Ť ť +Ũ ũ Ū ū Ŭ ŭ Ů ů Ű ű Ŵ ŵ Ŷ ŷ Ÿ Ź ź Ż ż Ž -ž ſ Ɓ Ƅ ƅ Ɔ Ɖ Ǝ Ə Ɛ Ƒ ƚ ƛ ƞ Ɵ Ƨ ƨ Ʃ ƪ Ʋ Ʒ Ƹ ƹ ƻ Ƽ ƽ ƾ ƿ ǀ ǁ ǂ ǃ lj Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ ǝ Ǣ ǣ Ǧ ǧ Ǩ ǩ -Ǯ ǯ ǰ Ǵ ǵ Ƿ Ǹ ǹ Ǽ ǽ Ș ș Ț ț Ȝ ȝ Ȟ ȟ Ƞ ȡ Ȥ ȥ Ȧ ȧ Ȯ ȯ Ȳ ȳ ȴ ȵ ȶ Ⱥ Ȼ ȼ Ƚ Ⱦ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ -ɍ Ɏ ɏ ɐ ɑ ɒ ɓ ɔ ɕ ɖ ɗ ɘ ə ɚ ɛ ɜ ɝ ɞ ɟ ɠ ɡ ɢ ɤ ɥ ɦ ɧ ɨ ɪ ɫ ɬ ɭ ɮ ɯ ɰ ɱ ɲ ɳ ɴ ɵ ɷ ɸ ɹ ɺ ɻ ɼ ɾ ɿ ʀ -ʁ ʄ ʅ ʆ ʇ ʈ ʉ ʊ ʋ ʌ ʍ ʎ ʏ ʑ ʒ ʓ ʔ ʕ ʖ ʗ ʘ ʙ ʚ ʛ ʜ ʝ ʞ ʟ ʠ ʡ ʢ ʬ ʻ ˌ ˙ ; · Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ -Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω ϛ Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј -Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и -й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є ѕ і ї ј љ њ ћ ќ ѝ ў џ +ž ſ Ɓ Ƅ ƅ Ɔ Ɖ Ǝ Ə Ɛ Ƒ ƚ ƛ ƞ Ɵ Ƨ ƨ Ʃ ƪ Ʋ Ʒ Ƹ ƹ ƻ Ƽ ƽ ƾ ƿ ǀ ǁ ǂ ǃ lj Ǎ ǎ Ǐ ǐ Ǒ ǒ Ǔ ǔ ǝ Ǣ ǣ Ǧ ǧ Ǩ ǩ Ǯ ǯ ǰ Ǵ ǵ Ƿ Ǹ ǹ Ǽ ǽ Ș ș +Ț ț Ȝ ȝ Ȟ ȟ Ƞ ȡ Ȥ ȥ Ȧ ȧ Ȯ ȯ Ȳ ȳ ȴ ȵ ȶ Ⱥ Ȼ ȼ Ƚ Ⱦ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ ɐ ɑ ɒ ɓ ɔ ɕ ɖ ɗ ɘ ə ɚ ɛ ɜ ɝ ɞ ɟ ɠ ɡ ɢ ɤ ɥ +ɦ ɧ ɨ ɪ ɫ ɬ ɭ ɮ ɯ ɰ ɱ ɲ ɳ ɴ ɵ ɷ ɸ ɹ ɺ ɻ ɼ ɾ ɿ ʀ ʁ ʄ ʅ ʆ ʇ ʈ ʉ ʊ ʋ ʌ ʍ ʎ ʏ ʑ ʒ ʓ ʔ ʕ ʖ ʗ ʘ ʙ ʚ ʛ ʜ ʝ ʞ ʟ ʠ ʡ ʢ ʬ ʻ ˌ ˙ ; +· Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω ϛ Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј +Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф +х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є ѕ і ї ј љ њ ћ ќ ѝ ў џ -Ѣ ѣ Ѳ ѳ Ѵ ѵ Ғ ғ Җ җ Қ қ Ң ң Ү ү Ұ ұ Һ һ Ӏ Ӂ ӂ Ӑ ӑ Ӓ ӓ Ӗ ӗ Ә ә Ӛ ӛ Ӝ ӝ Ӟ ӟ Ӣ ӣ Ӥ ӥ Ӧ ӧ Ө ө Ӫ ӫ Ӭ -ӭ Ӯ ӯ Ӱ ӱ Ӳ ӳ Ӵ ӵ Ӹ ӹ Ԁ Ա Բ Գ Դ Ե Զ Է Ը Թ Ժ Ի Լ Խ Ծ Կ Հ Ձ Ղ Ճ Մ Յ Ն Շ Ո Չ Պ Ջ Ռ Ս Վ Տ Ր Ց Ւ Փ Ք -Օ Ֆ ՙ ՚ ՛ ՜ ՝ ՞ ՟ ՠ ա բ գ դ ե զ է ը թ ժ ի լ խ ծ կ հ ձ ղ ճ մ յ ն շ ո չ պ ջ ռ ս վ տ ր ց ւ փ ք օ ֆ -և ֈ ֊ ֏ ־ ׃ ׆ א ב ג ד ה ו ז ח ט י ך כ ל ם מ ן נ ס ע ף פ ץ צ ק ר ש ת װ ױ ײ ׳ ״ ߈ Ⴀ Ⴁ Ⴂ Ⴃ Ⴄ Ⴅ Ⴆ Ⴇ -Ⴈ Ⴉ Ⴊ Ⴋ Ⴌ Ⴍ Ⴎ Ⴏ Ⴐ Ⴑ Ⴒ Ⴓ Ⴔ Ⴕ Ⴖ Ⴗ Ⴘ Ⴙ Ⴚ Ⴛ Ⴜ Ⴝ Ⴞ Ⴟ Ⴠ Ⴡ Ⴢ Ⴣ Ⴤ Ⴥ Ⴧ Ⴭ ა ბ გ დ ე ვ ზ თ ი კ ლ მ ნ ო პ ჟ -რ ს ტ უ ფ ქ ღ ყ შ ჩ ც ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ ᗡ ᗺ ᘔ ᚠ ᚢ ᚣ ᚤ ᚥ ᚦ ᚧ ᚨ ᚩ ᚪ ᚫ ᚬ ᚭ -ᚮ ᚯ ᚰ ᚱ ᚲ ᚳ ᚴ ᚶ ᚷ ᚸ ᚹ ᚺ ᚻ ᚼ ᚽ ᚾ ᚿ ᛀ ᛁ ᛂ ᛃ ᛄ ᛅ ᛆ ᛇ ᛈ ᛉ ᛊ ᛋ ᛌ ᛍ ᛎ ᛏ ᛐ ᛑ ᛒ ᛓ ᛔ ᛕ ᛖ ᛗ ᛘ ᛙ ᛚ ᛛ ᛜ ᛝ ᛞ -ᛟ ᛠ ᛡ ᛢ ᛣ ᛤ ᛥ ᛦ ᛧ ᛨ ᛩ ᛪ ᛫ ᛬ ᛭ ᛮ ᛯ ᛰ ᛱ ᛲ ᛳ ᛴ ᛵ ᛶ ᛷ ᛸ ᴀ ᴄ ᴅ ᴇ ᴉ ᴊ ᴋ ᴍ ᴏ ᴘ ᴚ ᴛ ᴜ ᴠ ᴡ ᴢ ᵷ ᶑ Ḃ ḃ Ḋ ḋ -Ḟ ḟ Ḡ ḡ Ḣ ḣ Ḧ ḧ Ḱ ḱ Ḿ ḿ Ṁ ṁ Ṅ ṅ Ṕ ṕ Ṗ ṗ Ṙ ṙ Ṡ ṡ Ṫ ṫ Ṽ ṽ Ẁ ẁ Ẃ ẃ Ẅ ẅ Ẇ ẇ Ẋ ẋ Ẍ ẍ Ẏ ẏ Ẑ ẑ ẗ ẘ ẙ ẛ -ẜ ẝ ẞ ẟ Ẽ ẽ Ỳ ỳ Ỹ ỹ Ỽ ỽ Ỿ ỿ ᾱ Ᾱ ῑ Ῑ ῡ Ῡ ‑ – — ‘ ’ ‚ “ ” „ † ‡ • … ‰ ‱ ′ ″ ‴ ‵ ‶ ‷ ‹ › ※ ‼ ‽ ⁂ ⁈ -⁉ ⁊ ⁋ ⁎ ⁏ ⁑ ⁒ ⁗ ⁰ ⁱ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ ₠ ₡ ₢ ₣ ₤ ₥ ₦ ₩ ₪ +Ѣ ѣ Ѳ ѳ Ѵ ѵ Ғ ғ Җ җ Қ қ Ң ң Ү ү Ұ ұ Һ һ Ӏ Ӂ ӂ Ә ә Ӛ ӛ Ӝ ӝ Ӟ ӟ Ӣ ӣ Ӥ ӥ Ө ө Ӫ ӫ Ӭ ӭ Ӯ Ӱ Ӳ Ӵ ӵ Ӹ ӹ Ԁ Ա Բ Գ Դ Ե Զ Է Ը Թ Ժ Ի +Լ Խ Ծ Կ Հ Ձ Ղ Ճ Մ Յ Ն Շ Ո Չ Պ Ջ Ռ Ս Վ Տ Ր Ց Ւ Փ Ք Օ Ֆ ՙ ՚ ՛ ՜ ՝ ՞ ՟ ՠ ա բ գ դ ե զ է ը թ ժ ի լ խ ծ կ հ ձ ղ ճ մ յ ն շ ո չ +պ ջ ռ ս վ տ ր ց ւ փ ք օ ֆ և ֈ ֊ ֏ ־ ׃ ׆ א ב ג ד ה ו ז ח ט י ך כ ל ם מ ן נ ס ע ף פ ץ צ ק ר ש ת װ ױ ײ ׳ ״ ߈ Ⴀ Ⴁ Ⴂ Ⴃ Ⴄ Ⴅ Ⴆ +Ⴇ Ⴈ Ⴉ Ⴊ Ⴋ Ⴌ Ⴍ Ⴎ Ⴏ Ⴐ Ⴑ Ⴒ Ⴓ Ⴔ Ⴕ Ⴖ Ⴗ Ⴘ Ⴙ Ⴚ Ⴛ Ⴜ Ⴝ Ⴞ Ⴟ Ⴠ Ⴡ Ⴢ Ⴣ Ⴤ Ⴥ Ⴧ Ⴭ ა ბ გ დ ე ვ ზ თ ი კ ლ მ ნ ო პ ჟ რ ს ტ უ ფ ქ ღ ყ შ ჩ ც +ძ წ ჭ ხ ჯ ჰ ჱ ჲ ჳ ჴ ჵ ჶ ჷ ჸ ჹ ჺ ჻ ჼ ჽ ჾ ჿ ᗡ ᗺ ᘔ ᚠ ᚢ ᚣ ᚤ ᚥ ᚦ ᚧ ᚨ ᚩ ᚪ ᚫ ᚬ ᚭ ᚮ ᚯ ᚰ ᚱ ᚲ ᚳ ᚴ ᚶ ᚷ ᚸ ᚹ ᚺ ᚻ ᚼ ᚽ ᚾ ᚿ ᛀ ᛁ ᛂ ᛃ ᛄ ᛅ +ᛆ ᛇ ᛈ ᛉ ᛊ ᛋ ᛌ ᛍ ᛎ ᛏ ᛐ ᛑ ᛒ ᛓ ᛔ ᛕ ᛖ ᛗ ᛘ ᛙ ᛚ ᛛ ᛜ ᛝ ᛞ ᛟ ᛠ ᛡ ᛢ ᛣ ᛤ ᛥ ᛦ ᛧ ᛨ ᛩ ᛪ ᛫ ᛬ ᛭ ᛮ ᛯ ᛰ ᛱ ᛲ ᛳ ᛴ ᛵ ᛶ ᛷ ᛸ ᴀ ᴄ ᴅ ᴇ ᴉ ᴊ ᴋ ᴍ ᴏ +ᴘ ᴚ ᴛ ᴜ ᴠ ᴡ ᴢ ᵷ ᶑ Ḃ ḃ Ḋ ḋ Ḟ ḟ Ḡ ḡ Ḣ ḣ Ḧ ḧ Ḱ ḱ Ḿ ḿ Ṁ ṁ Ṅ ṅ Ṕ ṕ Ṗ ṗ Ṙ ṙ Ṡ ṡ Ṫ ṫ Ṽ ṽ Ẁ ẁ Ẃ ẃ Ẅ ẅ Ẇ ẇ Ẋ ẋ Ẍ ẍ Ẏ ẏ Ẑ ẑ ẗ ẘ ẙ +ẛ ẜ ẝ ẞ ẟ Ẽ ẽ Ỳ ỳ Ỹ ỹ Ỽ ỽ Ỿ ỿ ᾱ Ᾱ ῑ Ῑ ῡ Ῡ ‑ – — ‘ ’ ‚ “ ” „ † ‡ • … ‰ ‱ ′ ″ ‴ ‵ ‶ ‷ ‹ › ※ ‼ ‽ ⁂ ⁈ ⁉ ⁊ ⁋ ⁎ ⁏ ⁑ ⁒ ⁗ ⁰ ⁱ ⁴ +⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ ₠ ₡ ₢ ₣ ₤ ₥ ₦ ₩ ₪ -₫ € ₭ ₮ ₰ ₱ ₲ ₳ ₴ ₵ ₶ ₷ ₸ ₹ ₺ ₻ ₼ ₽ ₾ ₿ ℗ ™ Ⅎ ⅁ ⅄ ⅋ ⅐ ⅑ ⅓ ⅔ ⅕ ⅖ ⅗ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟ ↉ ← ↑ → ↓ ↔ ⇄ ⇏ -⇐ ⇑ ⇒ ⇓ ⇔ ⇵ ∀ ∁ ∂ ∃ ∄ ∉ ∋ ∌ ∑ − ∓ ∛ ∜ ∝ ∞ ∥ ∧ ∨ ∩ ∫ ∮ ∴ ∵ ∷ ≔ ≠ ≢ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊢ ⊤ ⊥ ⊨ ⊻ ⊼ ⊽ ⋃ ⋆ -⌀ ⌂ ⌘ ⌚ ⌛ ⏏ ⏩ ⏪ ⏭ ⏮ ⏯ ⏳ ⏴ ⏵ ⏶ ⏷ ⏸ ⏹ ⏺ ⏻ ⏼ ⏽ □ ▲ △ ▶ ▷ ▼ ▽ ◀ ◁ ◆ ◇ ○ ◎ ● ◘ ◦ ☀ ☁ ☂ ☃ ☄ ★ ☆ ☈ ☔ ☠ -☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷ ☹ ☺ ☻ ☽ ♀ ♂ ♠ ♡ ♢ ♣ ♤ ♥ ♦ ♧ ♩ ♪ ♫ ♬ ♭ ♮ ♯ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ ⚐ ⚑ ⚓ ⚔ ⚗ ⚡ ⚥ ⛄ ⛈ ⛏ ⛨ ✂ ✉ -✎ ✔ ✘ ❄ ❌ ❣ ❤ ⟘ ⥝ ⧈ ⨰ ⩑ ⩒ ⫃ ⫄ ⭐ ⭘ ⯪ ⯫ ⱥ ⱦ Ɑ Ɐ ⱱ ⴀ ⴁ ⴂ ⴃ ⴄ ⴅ ⴆ ⴇ ⴈ ⴉ ⴊ ⴋ ⴌ ⴍ ⴎ ⴏ ⴐ ⴑ ⴒ ⴓ ⴔ ⴕ ⴖ ⴗ -ⴘ ⴙ ⴚ ⴛ ⴜ ⴝ ⴞ ⴟ ⴠ ⴡ ⴢ ⴣ ⴤ ⴥ ⸘ ⸚ ⸮ ⸵ ⸸ ⹁ ⹋ 〒 ㄥ Ꜧ ꜧ Ꜩ ꜩ ꜰ ꜱ ꜹ ꜻ Ꝛ ꝛ Ꝺ Ꞁ ꞁ Ꞩ ꞩ ꞯ Ʞ ff fi fl ffi ſt יִ ײַ שׂ -בּ וּ כּ פּ תּ וֹ בֿ פֿ + � +₫ € ₭ ₮ ₰ ₱ ₲ ₳ ₴ ₵ ₶ ₷ ₸ ₹ ₺ ₻ ₼ ₽ ₾ ₿ ℗ ™ Ⅎ ⅁ ⅄ ⅋ ⅐ ⅑ ⅓ ⅔ ⅕ ⅖ ⅗ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟ ↉ ← ↑ → ↓ ↔ ⇄ ⇏ ⇐ ⇑ ⇒ ⇓ ⇔ ⇵ ∀ ∁ ∂ ∃ ∄ ∉ +∋ ∌ ∑ − ∓ ∛ ∜ ∝ ∞ ∥ ∧ ∨ ∩ ∫ ∮ ∴ ∵ ∷ ≔ ≠ ≢ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊢ ⊤ ⊥ ⊨ ⊻ ⊼ ⊽ ⋃ ⋆ ⌀ ⌂ ⌘ ⌚ ⌛ ⏏ ⏩ ⏪ ⏭ ⏮ ⏯ ⏳ ⏴ ⏵ ⏶ ⏷ ⏸ ⏹ ⏺ ⏻ ⏼ ⏽ □ ▲ +△ ▶ ▷ ▼ ▽ ◀ ◁ ◆ ◇ ○ ◎ ● ◘ ◦ ☀ ☁ ☂ ☃ ☄ ★ ☆ ☈ ☔ ☠ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷ ☹ ☺ ☻ ☽ ♀ ♂ ♠ ♡ ♢ ♣ ♤ ♥ ♦ ♧ ♩ ♪ ♫ ♬ ♭ ♮ ♯ ⚀ ⚁ ⚂ ⚃ ⚄ ⚅ ⚐ +⚑ ⚓ ⚔ ⚗ ⚡ ⚥ ⛄ ⛈ ⛏ ⛨ ✂ ✉ ✎ ✔ ✘ ❄ ❌ ❣ ❤ ⟘ ⥝ ⧈ ⨰ ⩑ ⩒ ⫃ ⫄ ⭐ ⭘ ⯪ ⯫ ⱥ ⱦ Ɑ Ɐ ⱱ ⴀ ⴁ ⴂ ⴃ ⴄ ⴅ ⴆ ⴇ ⴈ ⴉ ⴊ ⴋ ⴌ ⴍ ⴎ ⴏ ⴐ ⴑ ⴒ ⴓ ⴔ ⴕ ⴖ ⴗ +ⴘ ⴙ ⴚ ⴛ ⴜ ⴝ ⴞ ⴟ ⴠ ⴡ ⴢ ⴣ ⴤ ⴥ ⸘ ⸚ ⸮ ⸵ ⸸ ⹁ ⹋ 〒 ㄥ Ꜧ ꜧ Ꜩ ꜩ ꜰ ꜱ ꜹ ꜻ Ꝛ ꝛ Ꝺ Ꞁ ꞁ Ꞩ ꞩ ꞯ Ʞ ff fi fl ffi ſt יִ ײַ שׂ בּ וּ כּ פּ תּ וֹ בֿ פֿ + � ---- Ligatures --- - = = -> == - = = = -> === - ! = -> != - ! = = -> !== - < = -> <= - > = -> >= - < - -> <- - - > -> -> - = > -> => - < = > -> <=> - + = -> += - - = -> -= - T O D O : -> TODO: - N O T E : -> NOTE: - / * * -> /** - * / -> */ - M i r a n d a-> Miranda - M i r a c o d e-> Miracode \ No newline at end of file +----- Ligatures ----- + = = -> == + = = = -> === + ! = -> != + ! = = -> !== + < = -> <= + > = -> >= + < - -> <- + - > -> -> + = > -> => + < = > -> <=> + + = -> += + - = -> -= + T O D O : -> TODO: + N O T E : -> NOTE: + / * * -> /** + * / -> */ + M i r a n d a -> Miranda + M i r a c o d e -> Miracode \ No newline at end of file diff --git a/images/glyphs.png b/images/glyphs.png index 5941e5d..059ecd4 100644 Binary files a/images/glyphs.png and b/images/glyphs.png differ diff --git a/images/ligatures.png b/images/ligatures.png index b3d9fcc..f1e1b4b 100644 Binary files a/images/ligatures.png and b/images/ligatures.png differ diff --git a/images/miracode-banner.png b/images/miracode-banner.png new file mode 100644 index 0000000..1414be1 Binary files /dev/null and b/images/miracode-banner.png differ diff --git a/src/characters.json b/src/characters.json index c8e9594..410a2b2 100644 --- a/src/characters.json +++ b/src/characters.json @@ -1549,7 +1549,8 @@ [1, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0] - ] + ], + "diagonals": false }, { "character": "macron", @@ -3825,7 +3826,8 @@ [1, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0] - ] + ], + "diagonals": false }, { "character": "♥", @@ -10260,7 +10262,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚀" + "character": "⚀", + "diagonals": false }, { "codepoint": 9857, @@ -10275,7 +10278,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚁" + "character": "⚁", + "diagonals": false }, { "codepoint": 9858, @@ -10290,7 +10294,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚂" + "character": "⚂", + "diagonals": false }, { "codepoint": 9859, @@ -10305,7 +10310,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚃" + "character": "⚃", + "diagonals": false }, { "codepoint": 9860, @@ -10320,7 +10326,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚄" + "character": "⚄", + "diagonals": false }, { "codepoint": 9861, @@ -10335,7 +10342,8 @@ [1, 1, 1, 1, 1, 1, 1] ], "group": "miscellaneous_symbols", - "character": "⚅" + "character": "⚅", + "diagonals": false }, { "codepoint": 9889, @@ -10431,7 +10439,8 @@ [0, 1, 1, 1, 1, 1, 0] ], "group": "miscellaneous_symbols", - "character": "☻" + "character": "☻", + "diagonals": false }, { "codepoint": 9785, @@ -14438,7 +14447,8 @@ ], "group": "specials", "character": "�", - "descent": 1 + "descent": 1, + "diagonals": false }, { "codepoint": 5794, diff --git a/src/generate_diacritics.py b/src/generate_diacritics.py index 2d44a7c..60b616a 100644 --- a/src/generate_diacritics.py +++ b/src/generate_diacritics.py @@ -14,11 +14,13 @@ def generateDiacritics(characters, diacritics): # Create dictionaries for faster lookup charactersByName = {} + charactersByCodepoint = {} diacriticsByCodepoint = {} for c in characters: charactersByName[c["name"]] = c["codepoint"] + charactersByCodepoint[c["codepoint"]] = c for d in diacritics: - diacriticsByCodepoint[d] = 0 + diacriticsByCodepoint[d] = diacritics[d] # List to store generated dictionary charList = [] @@ -37,14 +39,44 @@ def generateDiacritics(characters, diacritics): if not diacritic in diacriticsByCodepoint or not name in charactersByName or newName in charactersByName: continue codepoint = int(line.split(";")[0].strip(), 16) + baseChar = charactersByCodepoint[charactersByName[name]] # Store in a dictionary for serialization char = {} char["character"] = chr(codepoint) char["name"] = name + "_with_" + diacritic char["codepoint"] = codepoint - char["reference"] = charactersByName[name] - char["diacritic"] = diacritic - char["diacriticSpace"] = 1 + # char["reference"] = charactersByName[name] + # char["diacritic"] = diacritic + # char["diacriticSpace"] = 1 + pixels = [] + if "pixels" in baseChar: + pixels = baseChar["pixels"].copy() + top = determineTop(pixels) + # Trim whitespace from the top + if top > 0: + for i in range(top): + pixels.pop(0) + # Add a space for the diacritic + pixels.insert(0, [0] * len(pixels[0])) + # Add the diacritic to the base character + diacriticPixels = diacriticsByCodepoint[diacritic]["pixels"] + lengthDiff = len(pixels[0]) - len(diacriticPixels[0]) + if lengthDiff < 0: + print("Diacritic " + diacritic + " is wider than " + name + ", skipping") + continue + else: + # Add the diacritic to the base character + prefix = [] + for row in diacriticPixels: + newRow = row.copy() + # Add padding to the right + for i in range(lengthDiff): + newRow.append(0) + prefix.append(newRow) + pixels = prefix + pixels + else: + continue + char["pixels"] = pixels charList.append(char) for c in charList: @@ -52,3 +84,14 @@ def generateDiacritics(characters, diacritics): print("Added " + str(len(charList)) + " diacritic combinations") return characters + + +def determineTop(pixels): + # Determine the top of the character + top = 0 + for row in pixels: + for col in row: + if col == 1: + return top + top += 1 + return top diff --git a/src/generate_examples.py b/src/generate_examples.py index e8baa6f..bd46aa8 100644 --- a/src/generate_examples.py +++ b/src/generate_examples.py @@ -12,7 +12,7 @@ # along with this program. If not, see . def generateExamples(characters, ligatures, charactersByCodepoint): - terminalOutput = 26*"-" + " Monocraft " + 26*"-" + terminalOutput = 26*"-" + " Miracode " + 26*"-" index = 0 for character in characters: if character["codepoint"] == 32: @@ -24,7 +24,7 @@ def generateExamples(characters, ligatures, charactersByCodepoint): print(terminalOutput) - characterOutput = "--- Monocraft ---\n\n" + characterOutput = "--- Miracode ---\n\n" for i in range(65, 91): characterOutput += chr(i) + " " characterOutput += "\n" @@ -48,16 +48,16 @@ def generateExamples(characters, ligatures, charactersByCodepoint): index = 0 characterOutput += "\n" if i in charactersByCodepoint: - if index % 48 == 0: + if index % 60 == 0: characterOutput += "\n" characterOutput += chr(i) + " " index += 1 - ligatureOutput = "--- Ligatures ---" + ligatureOutput = "----- Ligatures -----" for ligature in ligatures: start = ''.join(map(lambda codepoint: ' ' + chr(codepoint), ligature['sequence'])) - start += (7 - len(ligature['sequence'])) * " " - output = 5 * " " + ''.join(map(lambda codepoint: chr(codepoint), ligature['sequence'])) + start += (10 - len(ligature['sequence'])) * " " + output = 8 * " " + ''.join(map(lambda codepoint: chr(codepoint), ligature['sequence'])) ligatureOutput += "\n" + start + "->" + output f = open("../examples/glyphs.txt", "w") diff --git a/src/miracode.py b/src/miracode.py index c81795c..8d08b3e 100644 --- a/src/miracode.py +++ b/src/miracode.py @@ -54,10 +54,11 @@ def generateFont(): for character in characters: miracode.createChar(character["codepoint"], character["name"]) pen = miracode[character["name"]].glyphPen() - top = 0 - drawn = character - - drawCharacter(character, miracode[character["name"]], pen) + if character.get("reference"): + referencedCharacter = charactersByCodepoint[character["reference"]] + drawCharacter(referencedCharacter, miracode[character["name"]], pen) + else: + drawCharacter(character, miracode[character["name"]], pen) miracode[character["name"]].width = PIXEL_SIZE * 6 print(f"Generated {len(characters)} characters") @@ -258,7 +259,23 @@ def ignoreDown(pixels, row, col): ("0", "0", "1", "0"), ("0", "X", "0", "0"), ("1", "1", "1", "~"), - ) + ), + # "→", "->" + ( + ("1", "0", "0"), + ("0", "X", "0"), + ("1", "1", "1"), + ("0", "1", "0"), + ("1", "0", "0"), + ), + # "←" + ( + ("0", "0", "1"), + ("0", "X", "0"), + ("1", "1", "1"), + ("0", "1", "0"), + ("0", "0", "1"), + ), ] for pattern in ignorePatterns: if matchPattern(pixels, row, col, pattern): @@ -276,6 +293,26 @@ def ignoreDiagonal(pixels, row , col, flipped): ("0", "1", "0"), ("0", "0", "1"), ), + # "↑" + ( + ("0", "0", "X", "0", "0"), + ("0", "1", "1", "1", "0"), + ("1", "0", "1", "0", "1"), + ), + # "→", "->" + ( + ("1", "0", "0"), + ("0", "X", "0"), + ("1", "1", "1"), + ("0", "1", "0"), + ("1", "0", "0"), + ), + # "↓" + ( + ("1", "0", "1", "0", "1"), + ("0", "X", "1", "1", "0"), + ("0", "0", "1", "0", "0"), + ), ] blacklist = [ ( @@ -482,8 +519,8 @@ def drawCharacter(character, glyph, pen, xOffset = 0): # print(f"Character {character['name']} has no pixels") return xOffset drawDiagonals = True - if "drawDiagonals" in character: - drawDiagonals = character["drawDiagonals"] + if "diagonals" in character: + drawDiagonals = character["diagonals"] edges = generateEdges(character["pixels"], drawDiagonals) edgesPerPoint = getEdgesPerPoint(edges) @@ -498,7 +535,7 @@ def drawCharacter(character, glyph, pen, xOffset = 0): leftMargin += character["leftMargin"] left = leftMargin * PIXEL_SIZE + xOffset - STROKE = 200 + STROKE = 192 HALF = STROKE / 2 DOT_RADIUS = HALF * 1.5 diff --git a/src/tests.json b/src/tests.json index 48b67e6..ff8ef0e 100644 --- a/src/tests.json +++ b/src/tests.json @@ -272,6 +272,45 @@ [2, 0, 0, 0, 1], [2, 2, 2, 2, 2] ] + }, + { + "character": "↑", + "codepoint": 8593, + "output": [ + [0, 0, 0, 0, 0], + [0, 0, 3, 0, 0], + [0, 2, 2, 2, 0], + [1, 0, 2, 0, 1], + [0, 0, 2, 0, 0], + [0, 0, 1, 0, 0], + [0, 0, 0, 0, 0] + ] + }, + { + "character": "→", + "codepoint": 8594, + "output": [ + [0, 0, 0, 0, 0], + [0, 0, 1, 0, 0], + [0, 0, 0, 2, 0], + [1, 2, 2, 2, 3], + [0, 0, 0, 2, 0], + [0, 0, 1, 0, 0], + [0, 0, 0, 0, 0] + ] + }, + { + "character": "↓", + "codepoint": 8595, + "output": [ + [0, 0, 0, 0, 0], + [0, 0, 1, 0, 0], + [0, 0, 2, 0, 0], + [1, 0, 2, 0, 1], + [0, 2, 2, 2, 0], + [0, 0, 3, 0, 0], + [0, 0, 0, 0, 0] + ] } ] } \ No newline at end of file