Closed orinciog closed 2 years ago
I also tested with symbola.ttf, font shown in: https://apps.timwhitlock.info/unicode/inspect?s=%E0%BC%9D%E2%98%86It+works
Unicode viewer:
Python:
Trying TibetanMachineUni.ttf, I was able to generate
Thank for your comment, but that font does not render other symbols: for example the star, as your picture already shows. What I want to do is to create an image from some Twitter display names, which can contain arbitrary symbols and emoji.
The question was actually why Pillow does not render symbols that the font knows about it. (From what I know, Symbola.ttf actually can render all unicode symbols, but with Pillow some special symbols are not rendered).
I've tried inspecting symbola.ttf and Lohit-Devanagari.ttf with https://fontdrop.info/ and https://github.com/fonttools/fonttools - I don't think they have "Tibetan Sign Rdel Nag Gcig"
From what I know, Symbola.ttf actually can render all unicode symbols
I don't think that is correct.
It doesn't look like you can change the font for https://apps.timwhitlock.info/unicode/inspect, but for Libre Office Writer, here is a screenshot I put together, after copying and pasting in characters, and changing the font to 'Times New Roman'. I hope this demonstrates that your earlier screenshot doesn't show conclusively that Lohit Devanagari has those characters.
Furthermore, if I go into the Insert menu, and into 'Special Character...', U+0F1D shows as a 'Missing Character'.
If you are interested in combining multiple fonts to cover more character ranges, see #4808 as an open request for a new feature to allow different fonts to be used based on whether or not characters are missing.
The beginning of that request states that this feature would be
Similarly to how web browsers work when they are missing characters from fonts - the OS fills that void from a default font.
Thank you very much for such a deep debugging. Indeed, I was incorrect in my assumptions and I'm sorry.
I will try to merge multiple fonts in order to render as many as possible chars. (For that particular sign, it is ok with TibetanMachineUni.ttf)
Again, thank you.
What did you do?
I'm trying to render an image that contains a Tibetan sign (\u0F1D). I tried a lot of fonts, none are working. For this sign, all fonts output a rectangle. I tried also the font that is used in LibreOffice Writer to output the sign (Lohit-Devanagari.ttf). In LibreOffice is ok, in python is not ok.
What did you expect to happen?
I expect to create an image with the sign \u0F1D (https://www.compart.com/en/unicode/U+0F1D)
What are your OS, Python and Pillow versions?
The output from Python is
The output from Libre Office Writer is (CTRL+shift+U -> u0f1d and enter):
Thank you