You are not logged in.

#1 2016-02-16 16:17:14

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Missing font sizes?

I'd like to select a font, say, Open Sans 13, for my desktop; but the size is just missing in the available ones.
it goes from 12 to 15.
The strange is that i can force a size of 10,5 and having a font that is bigger than 10 and lower than 11; but fractional numbers don't work for all of the sizes.

Why is that? Open Sans is a True Type font, so in theory, it should be possible to visualize it in every size.

Any explaination/workaround?

Thanks.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#2 2016-02-16 18:23:38

Hwiparam
Member
From: Poland
Registered: 2011-09-26
Posts: 95

Re: Missing font sizes?

What DE/WM?
In my case, using lxappearance, I can set the GUI (GTK+) font size to whatever I want, either by picking any of the available options in the font chooser dialog, or entering the desired value manually:
2016-02-16_191743_png_300x300_q85.jpg
In qtconfig (for Qt4 apps), I can enter "13" into the font size box and what I get is... Yes, 13-pt-sized font in Qt4 smile
So first of all, I think you should provide us with basic info about your desktop environment and the software you use to customize it.

Last edited by Hwiparam (2016-02-16 18:31:12)

Offline

#3 2016-02-17 07:43:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Missing font sizes?

It does not depend on DE nor WM; it is a freetype issue, and i'm just curious to understand why, being the ttf a vectorial font, i'm not free to choose any size i'd like (14,5323 say...) ; just like otf ones.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#4 2016-02-17 09:22:36

phw
Member
Registered: 2013-05-27
Posts: 318

Re: Missing font sizes?

I am not sure if I understand your problem. Does the font choose not allow you to set fractional sizes? If so, that's clearly an issue of this specific font chooser and certainly dependent on the desktop environment and/or UI toolkit. You really should tell us what kind of font chooser you are talking about.

Or can you set fractional sizes, but they don't make any difference (say you set it to 10.3, but it displays just as 10)? Does this happen for all fonts?

I just tried it here with the Gnome font choose, and for all the fonts I tried I could set any fraction I wanted.

Offline

#5 2016-02-17 12:14:11

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Missing font sizes?

Using kde4 and the kcm font module, i can type fractional sizes, but almost all of the ttf fonts look the same as integer ones.
10 = 10,1 = 10,2 = 10,3 = 10,4.
10,5 is a bit higher and stays the same until 10,9; changes at 11.

otf fonts are always ok and changes at fractional sizes.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#6 2016-02-17 13:35:10

mpan
Member
Registered: 2012-08-01
Posts: 1,674
Website

Re: Missing font sizes?

You do realize that pixels are at integer positions and you can’t render a glyph at any size and still make it look good? Hinting also plays its role, and the way it works is different in TrueType and OpenType fonts.

Offline

#7 2016-03-27 13:56:42

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Missing font sizes?

mpan wrote:

You do realize that pixels are at integer positions and you can’t render a glyph at any size and still make it look good? Hinting also plays its role, and the way it works is different in TrueType and OpenType fonts.

What are you talkubg about?
On my poor 800x480 galaxy s 2 i can zoom a web page and the font scales even by small amounts while keeping them very good looking.

Last edited by kokoko3k (2016-03-27 13:58:41)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#8 2016-03-27 14:00:45

phw
Member
Registered: 2013-05-27
Posts: 318

Re: Missing font sizes?

kokoko3k wrote:
mpan wrote:

You do realize that pixels are at integer positions and you can’t render a glyph at any size and still make it look good? Hinting also plays its role, and the way it works is different in TrueType and OpenType fonts.

What are you talkubg about?
On my poor 800x480 galaxy s 2 i can zoom a web page and the font scaleS even by small amounts while keeping them very goid looking.

You do realize that your Galaxy S2 (even if it is an older model) has a much higher pixel density than the average desktop monitor? And zooming a font (making it larger) is a very different action from changing the font just a tiny fraction. mpan just wrote the obvious: A pixel is the smallest unit you can use to render a glyph. And the rendering tries to match the glyph in question as good as possible to the pixel grid as it can. Yes, it absolutely is possible that a small change in size does not affect the appearance of small font sizes of some fonts. Any yes, obviously more pixels (meaning higher pixel density) helps a lot.

EDIT: Clarified the wording

Last edited by phw (2016-03-27 14:02:03)

Offline

#9 2016-03-27 14:13:00

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Missing font sizes?

I'm pretty sure that if i'd install mobile firefox on a desktop pc, i would be able to zoom and get font sizes that are missing right now, don't you?
-edit
Just tested arch chroot under my galaxy s2 with xserver xsdl and lxde and indeed, the font size jumps by a considerable amount between 8 and 9px.
Nothing different is rendered between that range, even if i specify non-integer sizes.
Those missing sizes are clearly rendered in the native android environment if i carefully zoom to a certain factor.

Last edited by kokoko3k (2016-03-27 14:35:05)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#10 2016-03-27 14:39:58

phw
Member
Registered: 2013-05-27
Posts: 318

Re: Missing font sizes?

I am not sure what you mean by zooming in, but at font sizes large enough you will of course see even tiny differences.

The problem is with small sizes. If an increase in font size will lead to a calculated size difference of less than a pixel you will probably see no change at all. Not sure what's so hard to see that obvious thing.

And yes, the results can be different for different fonts. Read a bit how hinting, anti aliasing and sub pixel rendering work.

Offline

#11 2016-03-31 15:56:10

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: Missing font sizes?

Libreoffice is able to scale fonts at every non-integer point size:
http://wpage.unina.it/aorefice/sharevari/lo.png
But for ttf fonts, it it just plays with the space between characters.

I suppose i should prefer otf fonts in the future.

Ignore that, It just varies with the spacing.

Last edited by kokoko3k (2016-03-31 19:30:42)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

Board footer

Powered by FluxBB