monotty / fonts

Monospaced Fonts for CTL Scripts (e.g. Devanagari, Tamil)
SIL Open Font License 1.1
21 stars 3 forks source link

Not able to Compile with the font forge and the ttf file you provided is corrupt #11

Open rstar24 opened 1 year ago

rstar24 commented 1 year ago

.ttf file you provided is corrupt since few letter of devnagri is not mapped correctly to their UTF code and I don't understand even after using the file you provided I am not being able to correctly display the glyphs correctly.

o-sdn-o commented 1 year ago

Could you please clarify in which application and operating system you are experimenting with .ttf font, and which code points are broken?

I created this font to see if it was possible to create a monospace font for scripts like Devanagari for text/terminal console which is cell-based. In other words, this font is proof of concept. The source of this font can only be compiled with FontForge Monotty Edition.

rstar24 commented 1 year ago

Greetings, Long story short, for month I was trying to search for a font that can display Devnagri Glyphs in terminal with dignity. Finally I found your repo, I appreciate your interest in my language and I respect your efforts trying to make a font which has more than 52 glyphs. I want to contribute to the project and my friends is also eager to do so but here are some grave problem which are beyond my current skills, the "Font Forge monotty edition" I tried to compile it but on Fedora 38 but some of the libraries were missing but I can't find then in the any of the package repos or other sources on internet moreover their is also no other compiled binary available for the mono "Font Forge monotty edition". This will be a very big challenge for you and me to get it compiled on my system to that I could contribute and some of my friends would be able to compile the "Font Forge monotty edition" and one more thing [image: Screenshot from 2023-08-17 00-24-30.png][image: Screenshot from 2023-08-17 00-21-29.png] when I tried your .ttf devnagri several code points are broke [image: Screenshot from 2023-08-17 00-30-57.png]

I am not even close to you what I saw in your image uploaded on the monotty/font repo. I think more code points are broken. I really want to contribute to this project. Regards Rishabh Rahore

On Wed, Aug 16, 2023, 22:54 Dmitry Sapozhnikov @.***> wrote:

Could you please clarify in which application and operating system you are experimenting with .ttf font, and which code points are broken?

I created this font to see if it was possible to create a monospace font for scripts like Devanagari for text/terminal console which is cell-based. In other words, this font is proof of concept. The source of this font can only be compiled with FontForge Monotty Edition https://github.com/monotty/fontforge.

— Reply to this email directly, view it on GitHub https://github.com/monotty/fonts/issues/11#issuecomment-1681005083, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX6ZZN2NNOCAUBCUAIMFTP3XVT63PANCNFSM6AAAAAA3SYMW2M . You are receiving this because you authored the thread.Message ID: @.***>

o-sdn-o commented 1 year ago

Thank you for your interest!

The main problem here is related to terminals (deva mono fonts are the second). All terminals process characters at the level of codepoints, and for the correct display of Devanagari it is necessary to work at the level of grapheme clusters. Moreover, it is necessary to cut the images of these grapheme clusters into halves for placement in cells (the terminal is a cell-based environment) and operate with these fragments. Terminal developers do not want to deal with such complexities. For example, even hieroglyphs, which usually occupy two cells, they cannot be divided into halves (however it supported somehow), but here Devanagari syllables, which occupy four or more cells - terminal developers think it is overkill. The terminal I'm making - vtm - will support this and this font is just for that.

Unfortunately, at the moment, vtm does not yet have a graphical subsystem and there is no way to test this font yet.

As for FontForge Monotty, I compiled it on Ubuntu, and I can try it later on Fedora.

o-sdn-o commented 1 year ago

Hi! The following commands are required to compile FontForge Monotty Edition on a Fedora 38 system. Run it in a terminal.

# Install dependencies
sudo yum install cmake gcc ninja-build gcc-c++ freetype-devel gettext libxml2-devel gtk3-devel python3-devel libspiro-devel libuninameslist-devel 

# Clone sources
cd ~
git clone https://github.com/monotty/fonts.git
git clone https://github.com/monotty/fontforge.git

# Build FontForge
cd fontforge
mkdir build
cd build
cmake -GNinja ..
ninja
ninja install

# Run FontForge
fontforge

Open the file monotty-dev2.sfd and you will see the following layout

image

rstar24 commented 1 year ago

I am grateful for your help, I have successfully compiled the font forge monotty edition and compiled the devnagri font to a ttf font but still, I am able to replicate what your result some character have improved but the overall size of the glyphs is very small compared to other and some of the glyphs overlap and get mixed with each other. While the single glyphs get displayed very well.Some Codepoints are still broken and can't understand why the size of glyphs is not uniform. See this [image: Screenshot from 2023-08-20 11-11-33.png]

Message ID: @.***>

[image: Screenshot from 2023-08-20 11-00-44.png] [image: Screenshot from 2023-08-20 10-50-45.png]

o-sdn-o commented 1 year ago

See this [image: Screenshot from 2023-08-20 11-11-33.png]

Image link is broken. It's just only the text: [image: Screenshot from 2023-08-20 11-11-33.png].

rstar24 commented 1 year ago

Oh I am sorry here is the images

On Sun, Aug 20, 2023 at 1:39 PM Dmitry Sapozhnikov @.***> wrote:

See this [image: Screenshot from 2023-08-20 11-11-33.png]

Image link is broken. It's just only the text: [image: Screenshot from 2023-08-20 11-11-33.png].

— Reply to this email directly, view it on GitHub https://github.com/monotty/fonts/issues/11#issuecomment-1685220058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX6ZZN5QPJW6ST6WJXL6ET3XWHA5FANCNFSM6AAAAAA3SYMW2M . You are receiving this because you authored the thread.Message ID: @.***>

o-sdn-o commented 1 year ago

No images again.

rstar24 commented 1 year ago

Screenshot from 2023-08-20 10-50-45 Screenshot from 2023-08-20 11-00-44 Screenshot from 2023-08-20 11-11-33 "May be I encountered some bug"

o-sdn-o commented 1 year ago

All terminals I know of operate only with Unicode codepoints when displaying text. As far as I know, this is unacceptable for Devanagari writing, in which the codepoints that make up a syllable must be fused in a grapheme cluster and output as a monolithic wide glyph, e.g. three-cell wide glyph:

SGR-CFA-Indic

Currently, in terminals, each code point is displayed in isolation from its neighbors, and the size of the glyph is additionally adjusted to the cell size, which breaks shirorekha. The only way to test this font is to apply it in a WYSIWYG (what you see is what you get) text editor like Write from LibreOffice, or Word from MS Office. These programs, unlike terminals, perform correct grapheme clustering and display correct fused glyphs (six codepoints: "र​्ल​्क​ि" -> two-cell wide glyph "र्ल्कि"):

indic_syllable-i9

The example that I have in the description of the font was made using a WYSIWYG editor, not a terminal emulator. And my task now is to make it possible to display the Devanagari script in my terminal. If I manage to do this, then perhaps other terminal developers will pick up this idea, including the kitty, VTE and others.

o-sdn-o commented 1 year ago

The difference between proportional and fixed-pitch rendering of glyphs

text sample (Hindi):
अनुच्छेद १.
सभी मनुष्यों को गौरव और अधिकारों के मामले में जन्मजात स्वतन्त्रता और समानता प्राप्त है ।
उन्हें बुद्धि और अन्तरात्मा की देन प्राप्त है और परस्पर उन्हें भाईचारे के भाव से बर्ताव करना चाहिए ।

colors: proportional font is marked in yellow, fixed-pitch in green, wide clusters are highlighted in tone

In GUI text editor (extra points over shirorekha for clarity): image

Terminal window from future (not implemented yet):
image

# cat ./devanagari-mono.sh
#! /bin/bash
echo -e '

 अनुच्छेद १.
 सभी मनुष्यों को गौरव और अधिकारों के मामले में
 जन्मजात स्वतन्त्रता और समानता प्राप्त है ।
 उन्हें बुद्धि और अन्तरात्मा की देन प्राप्त है और
 परस्पर उन्हें भाईचारे के भाव से बर्ताव करना चाहिए ।
'
o-sdn-o commented 1 year ago

I have a big question for native speakers. How acceptable is this distortion of the Devanagari glyphs? (I mean fitting to the terminal cell grid on the "Terminal window from future" screenshot - some glyphs have to be stretched a lot, and some have to be squeezed a lot)

rstar24 commented 1 year ago

I am a native speaker of hindi. I have to admit some times it is very easier for me to write in Enlgish rather in hindi for reason you stated above the graphem cluster making in hindi is one of very features of this language. As you showed here (six codepoints: "र​्ल​्क​ि" -> two-cell wide glyph "र्ल्कि" if translated into English this same glyph would be pronounced as "ralakee" almost twice more this one the reason one may love this script or hate it, this is done because the early sanskrit text used very large words as

कुलक्षये प्रणश्यन्ति कुलधर्माः सनातनाः। धर्मे नष्टे कुलं कृत्स्नमधर्मोऽभिभवत्युत (Bhagwat Geeta Chapter 1 Slok 40) observe the last word it would become very difficult to read if we don't use the graphem clustering.

rstar24 commented 1 year ago

I am interested in your project because I want to get this like result screenshot This guy has done some how for Mandarin I want to implement same for the Dev Nagri

o-sdn-o commented 1 year ago

CJK (Chinese, Japanese, Korean) scripts almost never use composite (more than one codepoint per glyph) grapheme clusters. They have one hieroglyph corresponds to one codepoint, so it is fully supported by terminals.

rstar24 commented 1 year ago

Yes, you are absolutely right. I have few friends of mine who are not so good in the command line or have a basic understanding regarding the computer. My internet is making Indians feel like home when learning some advanced stuff and I would also say it also has an aesthetic appeal to it. Using Hindi in terminal while teaching students Linux may spark interest among them to dig more into the rabbit hole.

nazaradeh commented 1 year ago

I am not a native speaker, but the distortion is not the biggest deal for me. I view it as something that's expected to get a mono spaced font. The matra can also maybe just be extended to be longer in order to fit a 3 to 4 character-long ligature.

Also, is there any update/plans to add Bengali to the fonts? I see it listed as a to-do, but I also see no commits in a year, so maybe the creators don't have the time anymore. There are no good mono spaced Bangla fonts out there unfortunately.

o-sdn-o commented 1 year ago

I mistakenly clicked to close the issue 😉.

Thanks for your feedback. The creation of fonts for the rest of the scripts in the list is pending the creation of a terminal capable of displaying them. Even though I've been working full-time seven days a week on my terminal project for five years now, it could take a couple more years and I'm looking forward to it.

o-sdn-o commented 1 year ago

I was a little imprecise, my project is not a terminal, but a textual desktop environment vtm. The terminal is just one of the accessories.

rstar24 commented 1 year ago

I mistakenly clicked to close the issue 😉.

Thanks for your feedback. The creation of fonts for the rest of the scripts in the list is pending the creation of a terminal capable of displaying them. Even though I've been working full-time seven days a week on my terminal project for five years now, it could take a couple more years and I'm looking forward to it.

It is none of my business but Can you shed some light on to the value of why are you going through such huge length to make a desktop environment.Because I am seeing the amount of dedication you have given to it is really big.

o-sdn-o commented 1 year ago

The ultimate goal is to create a tool (Desktopio Framework documentation placeholder) for easy and fast creation of cross-platform desktop applications. Since the graphic subsystems are very different on different platforms, I decided to first do all this stuff only for textual consoles/terminals. Despite the fact that the text mode on different platforms (windows/unix) is very different, it is still easier to create and debug cross-platform apps. My textual desktop environment is a host for my (DirectVT) applications like a graphical desktop environment for graphical/GUI applications. When I implement a GUI-frontend for my applications, then my environment will automatically become a graphical desktop environment. Moreover, applications created using desktopio framework will be able to run both in a text environment such as a terminal, and in any graphical environment on any platform.