Page MenuHome

ԥ abkhazian letter shows as a square in Blender
Closed, ResolvedPublic


Ԥ(U0524),ԥ(U0525) abkhazian letters are displayed in Blender as squares.
Here is an screenshot to the issue:

Event Timeline

Daniel Tlisha (Nart) updated the task description. (Show Details)
Bastien Montagne (mont29) triaged this task as Normal priority.Feb 27 2019, 11:06 AM

Thanks, will check on that

Yes, the google font "Droid Sans", that comes by default with Blender, does not appear to support those characters.

@Daniel Tlisha (Nart) - You should, for now, select a font (Preferences / Interface / Text Rendering / Interface Font that does work for your character set.

A good one to try is google's "Noto Sans" found here:

NotoSans-Regular.ttf is only 445KB and supports 582 languages (including abkhazian)

@Harley Acheson (harley) Acheson (harley) This is a good solution for my personal use.

In order to attract new comers to Blender that would use it with the Abkhazian interface, this can be a serious issue.

@Daniel Tlisha (Nart) :

In order to attract new comers to Blender that would use it with the Abkhazian interface, this can be a serious issue.

I understand, but it is a bigger problem that it might seem at first.

We need to do our own font-handling and drawing and so can't rely on using a font that is supplied by the operating system. Therefore we have to ship blender with font(s).

We are currently shipping with a font (Droid Sans) that supports a fairly large number of languages fairly well. But there isn't a single font that does all languages very well. Nor can there be, because of the way that so many languages and regions overlap in the way that they use characters.

Google has a project to support all languages and regions in a typeface family that also tries to maintain some similarity between them. That is Noto Fonts. But using those would involve shipping a few different fonts with Blender rather than one. And that would also mean we'd need to logically tie a font to a translation so that we'd use "Noto Sans" for most, Noto Sans CJK for some, etc. But I think just three or so would cover all that we need (and far more than we would probably ever need) and could still be smaller than the total size of droid sans (5MB uncompressed).

I'll do some research on it.

Daniel Tlisha (Nart) added a comment.EditedMar 1 2019, 1:14 PM

@Harley Acheson (harley) Acheson (harley) I found Ҧ(U04A6) ҧ(U04A7) in Droid Sans, this can be used instead, it's not a perfect solution.

Couldn't we add the missing Unicode characters to the Droid Sans font that is shipped with Blender? the process is fairly simple, the svg file for the character can be imported to it's corresponding Unicode slot, can be done with this online tool glyphrstudio, one thing is that I'm not sure if it keeps all the font's data intact afterwards.

@Daniel Tlisha (Nart)

Couldn't we add the missing Unicode characters to the Droid Sans font that is shipped with Blender?

Actually I hadn't thought of that because I had assumed that the font we shipped was an unchanged binary.

But I was wrong. It turns out that the font we ship, that we call "droidsans.ttf", is already a custom thing. From the notes about it:

Blender Main I18n font ("droidsans.ttf") includes glyphs imported from the following fonts:

  1. DejaVu Sans
  2. Droid Sans Regular
  3. Samyak-devanagari
  4. Droid Sans Hebrew Regular
  5. Droid Sans Ethiopic Regular
  6. Samyak-tamil
  7. KhmerOSsys
  8. tlwg' Loma (Thaï)

These were merged using FontForge in (approximately) the above order.

So if the font we use has empty unicode slots for just a few characters you need then they can certainly be added.

Is this something that you can look into? Not necessarily all of it, but anything you can do would be appreciated. For something like this it would make the most sense for it to be initiated by someone familiar in the target language.

The font that comes with blender can be found easily. There's probably a "2.80" folder (or similar) inside the folder that contains the blender executable. then in "datafiles / fonts" you should find "droidsans.ttf.gz". That file can be uncompressed with many compression utilities.

The best thing would be to look through those other fonts listed above since we are already dealing with their licenses correctly, looking for a character that matches the rest as best as you can in style, size, weight, character. It especially has to be a similar weight or will look funny. But that is easy to see by just testing the font in some other application that will allow you edit Abkhazian sentences.

If you are able to actually merge them in that would be great, but even doing part of this would be nice. So just saying "copy U04A6 and U04A7 from the current Droid Sans Regular as found on google" would be awesome.

Personally I'd prefer this approach to dealing with custom strokes like in your attached svg files as that would make future maintenance of the font more complex.

Note that I am not the maintainer of this part of the Blender source. Any changes would most likely be approved by @Bastien Montagne (mont29).

Thanks for you help!

Daniel Tlisha (Nart) added a comment.EditedMar 2 2019, 11:09 AM

Copy U0525 and U0524 from DejaVu Sans

I did it with fontforge, here is the output file if needed:

@Harley Acheson (harley)
@Bastien Montagne (mont29)

@Daniel Tlisha (Nart)

Copy U0525 and U0524 from DejaVu Sans

I came close, but I am not happy enough to continue yet...

I was able to use FontForge to confirm that U0525 and U0524 are blank in our current font, then copy those from DejaVu Sans (Book weight). Then export the TTF file to the same name, and then make a "gz" version of it.

Afterward that missing "n" is there. However. When viewing the list of available languages in Blender, I see another issue. The following image shows that language in my list (while resolution scale set to 2.0). The top one without the "n", and the bottom shows it there after patch applied. But what is with the second-to-last character? I wouldn't want to proceed without fixing that too. Do you see the same thing? If yes, can you figure out which character that is and try to find a replacement for that too? Note that at "Resolution scale" set to 1.0 it doesn't spike up so high, but still looks like a little solid spikey thing that doesn't look right.

@Harley Acheson (harley)

I wasn't able to produce the issue, I tested on Ubuntu 18.04 and Windows 10 x64, it seems good from my end.
On another note, Can we add these two U0525 and U0524 to the mono font as well, it's missing there, How can I know the list of fonts that has been merged for the mono?

Thanks for the investigations, I ended up adding all 'extended cyrillic' chars present in DejaVuSans font.

Ideally using noto font would have been nicer, but this one is not really compatible with the DejaVu/Droid familly.