View Single Post
Old 12-27-2022, 05:37 AM   #6
Renate
Onyx-maniac
Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.Renate ought to be getting tired of karma fortunes by now.
 
Posts: 3,987
Karma: 18026955
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5, Go6
Most of you haven't noticed this because undoubtedly you've been wasting all your time reading books in your favorite (non-Onyx) font.

There is an additional problem with this whole setup. There are these RobotoFake.. fonts that are the first choice for a system sans-serif font. They have widths and kerning but no actual glyphs. I haven't run into this before but apparently they're in there for efficiency. Normally the second choice would be the normal Roboto... fonts. The way this should work is when doing layout or ellipsising. You ask Android, "How many pixels wide is 'my test message'?" Android consults RobotoFake... and says, "112 pixels exactly". You say, "Ok, I have room, draw it." Android needs the glyphs to draw, consults normal Roboto..., draws it, then says, "Hey that was actually 112 pixels!" Unfortunately, Onyx made their fonts the second choice and even the widths of normal characters are not going to be the same as what RobotoFake... said. This could exhibit itself as even normal text not fitting (or maybe ellipsising?).

There are two clean ways of fixing this in /system/etc/fonts.xml:
  1. Get rid of Onyx and have RobotoFake, Roboto (I did this)
  2. Get rid of RobotoFake, Onyx, Roboto and have just YourFont
Remember, this is only for the system sans-serif font.

The additional example below has no space characters inserted.
Attached Thumbnails
Click image for larger version

Name:	single.png
Views:	174
Size:	7.4 KB
ID:	198618  

Last edited by Renate; 12-27-2022 at 06:29 AM.
Renate is offline   Reply With Quote