FreeOrion

Forums for the FreeOrion project
It is currently Sun Oct 22, 2017 6:27 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: New Roboto font
PostPosted: Sun Sep 04, 2016 7:52 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 204
Location: France
EDIT by Vezzra: split topic from the "Settings to be adjusted for the 0.4.6 release" thread as it steers the discussion about the new Roboto font to the question what to do about it in master, which doesn't really belong to the topic of settings for 0.4.6.

Vezzra wrote:
Very well, 15/16pt it is :D


Fine.

What about the master branch?

If we also go back to 15/16pt in the master branch, in this case, we could use the latest version of Roboto font (2.134 -hinted, more "glyph-complete", although I still have to add U+27F2 and U+27F3 glyphs -'Clockwise Gapped Circle Arrow' in the Production Queue), because in 15pt/16pt size, Roboto 2.001101 and 2.134 are similar (2.134 seems a little bit narrower and lighter, but it's just an impression, as a layer overlay does not show surprisingly any differences).

Noticeable differences arise only in 16pt/17pt, in which Roboto 2.001101 looks way much better.

Some comparison screenshots to better explain:

Attachment:
roboto_15-16.png
roboto_15-16.png [ 20.62 KiB | Viewed 627 times ]


Attachment:
roboto_16-17.png
roboto_16-17.png [ 29.87 KiB | Viewed 627 times ]


What is good with 2.001101 in 16/17pt size, is the font smoothing, almost perfect in FO. In 15/16pt, the edge smoothing is a little bit more imprecise, and a little bit tiring for the eyes.

Well, I suppose it also depends of the screen quality.

EDIT: after a few hours playing FO with 15/16pt font size, I get used to and it's OK. ^^

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 1:43 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4226
Location: Sol III
Well the first question would be: do we really want to reduce default font size to 15/16 in master too? Geoff introduced the increased default, and IIRC has expressed a strong preference for keeping it (he only agreed to reduce it for the release). As the Roboto font seems to be a bit smaller than the old DejaVu overall, I think he'll be even less inclined to return to the old default size - Geoff?

But even if we do return to default 15/16, if the version of Roboto we use currently looks better at larger sizes than the updated versions, then I'd prefer to keep the current version, to provide players that use those larger sizes get a better looking version too.


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 3:47 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 204
Location: France
Well, I asked because of the Roboto font being rendered noticeably bigger on Mac.

In fact, it seems that the font rendering is smaller/narrower only on Windows.

This screenshot of RC1 on Linux shows that in 15/16 pt, Roboto looks like on Windows set with the 16/17 pt font size (compare the font in the SitRep and in the Window titles, with the screenshots made on Windows in the OP):

Image

To summarize:

Font rendering in FO -> Mac or Linux 15/16 pt font size = Windows 16/17pt font size

It seems to have been also the case with the previous DejaVu font (as pointed out by Vezzra in the previous topic).

Well, if it's not a problem, I agree that we keep the Roboto version 2.001101 and the 16/17pt font size by default in the master branch (good, as I prefer it ^^)

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 4:54 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12004
Location: Munich
Ouaz wrote:
In fact, it seems that the font rendering is smaller/narrower only on Windows.
Possibly explains part of why I always wanted the font bigger than most other people.


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 5:07 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4226
Location: Sol III
Hm, considering these new insights, maybe it would make sense to use different default font sizes depending on platform? If the difference is that noticable...


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 5:11 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
Vezzra wrote:
Hm, considering these new insights, maybe it would make sense to use different default font sizes depending on platform?


It would be better to check why the different platforms do render differently. Otherwise there is no way to create consistent UI designs.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 6:36 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 204
Location: France
Vezzra wrote:
If the difference is that noticable...


On Windows, the 15/16pt is acceptable and looks good (although, IMO, the 16/17pt size looks better)

But on Mac (and also Linux, but the difference is slighter), 16/17pt is way too big (cf. your OSX screenshots) and decreasing the default font size in the Release Branch was a good decision and the better compromise at the moment.

adrian_broher wrote:
It would be better to check why the different platforms do render differently.


Maybe because of the hinting instructions?

Quote:
"Mac OS vs. Windows

A lot has been written about how Mac OS renders text compared to Windows. I will not go into details here, but the primary difference is that Microsoft’s rasteriser tries to align characters to whole pixel grid, with the result that ‘Regular’ weights look lighter, ‘Bold’ weights look heavier, and subtle details of design can be lost at small point sizes. Apple’s rasteriser tries to preserve the design of the typeface as much as possible, sometimes at the cost of image clarity. Windows’ rasterising software produces extremely good results with a few built-in TrueType fonts, but sub-optimal results with 99% of other typefaces. The Mac OS Quartz technology ignores font hinting completely and renders all fonts equally well regardless of their font format.

So let’s focus now on Windows — this is where hinting makes a difference — and let’s focus on TrueType fonts, which look superior in Windows at the moment. "


> https://www.typotheque.com/articles/hinting
> https://damieng.com/blog/2007/06/13/fon ... d-mac-os-x

The bold part maybe explains why it is needed to respectively increase/decrease the font size of one step on Windows/Mac (15/16 <> 16/17) in order to obtain the same font rendering between both OS.

Moreover:

Quote:
" Roboto recommended usage:

Windows: use the fonts from roboto-hinted.zip, which contain hinting instructions.
Android: use roboto-android.zip, which have had metrics modified and unused data removed.
Everywhere else: use roboto-unhinted.zip"


> https://github.com/google/roboto/releases

I used the roboto-hinted 2.001101 (Windows compatible) for the commit. I tested roboto-unhinted 2.134 in FO on Windows, and the result was very bad (the font looked then like a monospaced font).

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Last edited by Ouaz on Mon Sep 12, 2016 2:46 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 7:10 pm 
Offline
Programmer
User avatar

Joined: Fri Mar 01, 2013 9:52 am
Posts: 1040
Location: Germany
Ouaz wrote:
Maybe because of the hinting instructions?


Maybe, but probably not for the reason you noted. We don't use the native font rendering API's but FreeType2 everywhere (or don't we?, Vezzra?, Geoff?). But I don't know if the FreeType build in the FreeOrion SDKs are configured the same way regarding the enabled (and used) hinting algorithms. Some of those are patented and not enabled by default in the FreeType release package. Another reason could be that the DPI settings for FreeType are not uniform on all platforms but I doubt that's the problem because I already checked that in the code and didn't see any obvious flaw.

Ouaz wrote:
I used the roboto-hinted 2.001101 (Windows compatible) for the commit. I tested roboto-unhinted 2.34 in FO on Windows, and the result was very bad (the font looked then like a monospaced font).


Actually the unhinted version should look best on any platform because, as already mentioned, we don't use the native Windows Font rendering.

_________________
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Sun Sep 11, 2016 8:20 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12004
Location: Munich
adrian_broher wrote:
We don't use the native font rendering API's but FreeType2 everywhere (or don't we?, Vezzra?, Geoff?).
As far as I know, it's all through FreeType2, but it's all deep in the GG code, I think, so I could easily not know about some exception.

There are some options that can be adjusted in FreeType by editing header files such as

include\freetype\config\ftoption.h

One of note it subpixel rendering, which appears to be disabled for me.


Top
 Profile  
 
 Post subject: Re: New Roboto font
PostPosted: Mon Sep 12, 2016 2:43 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 204
Location: France
Thanks for the explanation, Adrian.

Quote:
Actually the unhinted version should look best on any platform because, as already mentioned, we don't use the native Windows Font rendering.


Yes, my bad, this wasn't with Roboto unhinted (I tested so many fonts that I confuse things ^^).

With Roboto unhinted (2.134, as I didn't found an unhinted version for 2.001101), the letter spacing is messed up on Windows:

Attachment:
roboto_unhinted_W7.PNG
roboto_unhinted_W7.PNG [ 27.52 KiB | Viewed 521 times ]


But yes, you're right, the font edges are sharper and cleaner than with the hinted version (at least on Windows).

_________________
I release every updated file under the CC-BY-SA 3.0 license.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group