Ubuntu font workaround

Search This thread

ggdu

Member
Jan 28, 2011
11
11
When using Ubuntu font many users see rectangles in different places, that don’t belong there. They come from the .notdef character which in that very font has a rectangle shaped outline. This character appears when the font doesn’t contain a character for the codepoint requested. It seems like some apps use codepoints different from usual spacing characters to show empty room: e.g. with launcher pro in the app drawer long names are shortened with an ellipsis after which those squares appear. The reason why using other fonts doesn’t show these squares is, that some fonts only have an empty space at .notdef, so no outline appears. One can verify this by using the DroidSansNotdef.ttf which I attach. There I’ve only added an outline to the .notdef character and you’ll get the same behaviour as with the Ubuntu font.

UbuntuAndroidfix.ttf has an empty space in .notdef so it isn’t visible. Nevertheless, this is only a workaround for a bug that’s somewhere else.

Edit: As shown below, the real reason is missing U-FEFF in the font, so it is a font bug. Attached you find all four styles (Ubuntu regular, italic, bold and bold italic) with the added character.

20.4.12 — New version: added spacing characters U-2000—U-200F to fix some more box-char appearances.
 

Attachments

  • UbuntuAndroidfix.tar.bz2
    431.8 KB · Views: 103
Last edited:

ggdu

Member
Jan 28, 2011
11
11
Of course this is better, it’s not only a workaround, it’s a fix.
I attach a new version of the fixed font with the added glyph. At least the Droid Sans that I downloaded from Google webfonts (to be sure that I have the latest...) doesn’t contain it.

Edit: Attachment removed, new attachment in first post.
 
Last edited:

kyrillos13

Inactive Recognized Developer
Sep 26, 2010
4,279
5,152
Athens
Yeah thats right. But which program do you use to edit the font?
I used the Font Creator and the output size of the font is 312kb (instead of 335kb of the original ubuntu font). Your font is about 680kb. I used the droidsans.ttf from ICS platform (v1.0 build 114) and it did contain the glyph :p
 

Attachments

  • fonts.rar
    240.6 KB · Views: 38
  • Like
Reactions: SoloRazr

ggdu

Member
Jan 28, 2011
11
11
I use fontforge and I'm doing font design in my spare time. But I've never thought about file sizes. I'll have a look at it later.

Sent from my GT-I5800 using Tapatalk 2
 

ggdu

Member
Jan 28, 2011
11
11
I'm working on EB Garamond, my main project. I can't post a link yet, but you'll find it easily via google.

Sent from my GT-I5800 using Tapatalk 2
 

kyrillos13

Inactive Recognized Developer
Sep 26, 2010
4,279
5,152
Athens
h i like the font. Nice!

The font is really good!

I love Greek & Ancient Greek letters in your font (i like the curves) but italic Greek just isn't my type. I think it should be less space between some letters.

Great work :)
 
  • Like
Reactions: ggdu

ggdu

Member
Jan 28, 2011
11
11
Yeah thats right. But which program do you use to edit the font?
I used the Font Creator and the output size of the font is 312kb (instead of 335kb of the original ubuntu font). Your font is about 680kb. I used the droidsans.ttf from ICS platform (v1.0 build 114) and it did contain the glyph :p

I’ve found the reason for the bigger size. I’ve overseen to untick the old style kern table option. Now it’s only 273,4kb. I’ll upload it together with bold and italic.

h i like the font. Nice!

The font is really good!

I love Greek & Ancient Greek letters in your font (i like the curves) but italic Greek just isn't my type. I think it should be less space between some letters.

Great work :)

Thank you! The italic is far away from ready, especially greek and cyrillic still need alot of work.
 
  • Like
Reactions: kyrillos13
Yeah thats right. But which program do you use to edit the font?
I used the Font Creator and the output size of the font is 312kb (instead of 335kb of the original ubuntu font). Your font is about 680kb. I used the droidsans.ttf from ICS platform (v1.0 build 114) and it did contain the glyph :p

Thanks so much for the fixed ubuntu font. Looks great on my Live with Walkman™. Can I make a request though?

I see the same box character on the attached font. Can you help me fix it like you did for the ubuntu font, please?

Thanks so much!
 

Attachments

  • Android.zip
    474.7 KB · Views: 12

ggdu

Member
Jan 28, 2011
11
11
Thanks so much for the fixed ubuntu font. Looks great on my Live with Walkman™. Can I make a request though?

I see the same box character on the attached font. Can you help me fix it like you did for the ubuntu font, please?

Thanks so much!

You’re welcome!

The thing about the squares is, they show up wherever a glyph is found which doesn’t have a representation in the font. So it depends on where you see the box character. With the fixed Ubuntu font for example you’ll see many boxes if you want it to display Vietnamese because it lacks a whole block of multiple accented characters which will be added in a later development stage. The Droid fonts you attached will fail for many more languages because it only contains the code points of ISO-8859-1 which is oriented at western european languages (it doesn’t even contain a Euro symbol). If that is the problem, the simple fix won’t help you, one would have to know which characters you are missing to do something about it.

The second problem is: what is the license of the fonts? There’s no licence information so it’s not clear if one may change anything about the font.

There’s an Android logo font which contains the FEFF character and many more (incl. greek and cyrillic): http://xdaforums.com/showpost.php?p=3771562&postcount=86 — perhaps this helps.
 

ggdu

Member
Jan 28, 2011
11
11
New version as reaction on more box-sightings in the Kyrillos Rom thread. In fact the character U-2009 (thin space) was missing. I added the whole block of (non)spacing characters from U-2000 up to U-200F.
Non-vietnamese UI-elements should hardly show boxes again.
For downloads visit first post.
 

m1trand1r

Senior Member
Mar 6, 2011
12,403
9,586
You don't wanna know.....

m1trand1r

Senior Member
Mar 6, 2011
12,403
9,586
You don't wanna know.....
They are already present in the font. If you look at the specimen (https://github.com/georgd/EB-Garamond/blob/master/specimen/Specimen.pdf?raw=true) on p.3 you find a czech example that shows all three of them (at least in lowercase).

thanks for reply & linky...i like ur font very much:D
edit: @ggdu....is the font itself avaliable for download allready?
that would be nice:D:)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sent from Galaxy
Hercolubus Rom v 2.2
powered by
Hillbeasts test 002 kernel.zip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    When using Ubuntu font many users see rectangles in different places, that don’t belong there. They come from the .notdef character which in that very font has a rectangle shaped outline. This character appears when the font doesn’t contain a character for the codepoint requested. It seems like some apps use codepoints different from usual spacing characters to show empty room: e.g. with launcher pro in the app drawer long names are shortened with an ellipsis after which those squares appear. The reason why using other fonts doesn’t show these squares is, that some fonts only have an empty space at .notdef, so no outline appears. One can verify this by using the DroidSansNotdef.ttf which I attach. There I’ve only added an outline to the .notdef character and you’ll get the same behaviour as with the Ubuntu font.

    UbuntuAndroidfix.ttf has an empty space in .notdef so it isn’t visible. Nevertheless, this is only a workaround for a bug that’s somewhere else.

    Edit: As shown below, the real reason is missing U-FEFF in the font, so it is a font bug. Attached you find all four styles (Ubuntu regular, italic, bold and bold italic) with the added character.

    20.4.12 — New version: added spacing characters U-2000—U-200F to fix some more box-char appearances.
    2
    thanks for reply & linky...i like ur font very much:D
    edit: @ggdu....is the font itself avaliable for download allready?
    that would be nice:D:)

    sorry for the long delay, I’ve been changing things. here’s the download: https://github.com/georgd/EB-Garamond/downloads
    2
    New version as reaction on more box-sightings in the Kyrillos Rom thread. In fact the character U-2009 (thin space) was missing. I added the whole block of (non)spacing characters from U-2000 up to U-200F.
    Non-vietnamese UI-elements should hardly show boxes again.
    For downloads visit first post.
    2
    Thanks so much for the fixed ubuntu font. Looks great on my Live with Walkman™. Can I make a request though?

    I see the same box character on the attached font. Can you help me fix it like you did for the ubuntu font, please?

    Thanks so much!

    You’re welcome!

    The thing about the squares is, they show up wherever a glyph is found which doesn’t have a representation in the font. So it depends on where you see the box character. With the fixed Ubuntu font for example you’ll see many boxes if you want it to display Vietnamese because it lacks a whole block of multiple accented characters which will be added in a later development stage. The Droid fonts you attached will fail for many more languages because it only contains the code points of ISO-8859-1 which is oriented at western european languages (it doesn’t even contain a Euro symbol). If that is the problem, the simple fix won’t help you, one would have to know which characters you are missing to do something about it.

    The second problem is: what is the license of the fonts? There’s no licence information so it’s not clear if one may change anything about the font.

    There’s an Android logo font which contains the FEFF character and many more (incl. greek and cyrillic): http://xdaforums.com/showpost.php?p=3771562&postcount=86 — perhaps this helps.
    1
    Basically after searching a bit more i found this workaround: http://xdaforums.com/showpost.php?p=16895848&postcount=269 :) It seems better. But thank you anyway!