New Roboto font

Development of artwork, requests, suggestions, samples, or if you have artwork to offer. Primarily for the artists.
Post Reply
Message
Author
User avatar
Ouaz
Dyson Forest
Posts: 232
Joined: Wed Aug 13, 2014 7:21 pm
Location: France

New Roboto font

#1 Post by Ouaz »

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:
roboto_15-16.png
roboto_15-16.png (20.62 KiB) Viewed 10248 times
roboto_16-17.png
roboto_16-17.png (29.87 KiB) Viewed 10248 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.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: New Roboto font

#2 Post by Vezzra »

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.

User avatar
Ouaz
Dyson Forest
Posts: 232
Joined: Wed Aug 13, 2014 7:21 pm
Location: France

Re: New Roboto font

#3 Post by Ouaz »

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.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: New Roboto font

#4 Post by Geoff the Medio »

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.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: New Roboto font

#5 Post by Vezzra »

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...

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: New Roboto font

#6 Post by adrian_broher »

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

User avatar
Ouaz
Dyson Forest
Posts: 232
Joined: Wed Aug 13, 2014 7:21 pm
Location: France

Re: New Roboto font

#7 Post by Ouaz »

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?
"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:
" 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).
Last edited by Ouaz on Mon Sep 12, 2016 2:46 pm, edited 1 time in total.
I release every updated file under the CC-BY-SA 3.0 license.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: New Roboto font

#8 Post by adrian_broher »

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

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: New Roboto font

#9 Post by Geoff the Medio »

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.

User avatar
Ouaz
Dyson Forest
Posts: 232
Joined: Wed Aug 13, 2014 7:21 pm
Location: France

Re: New Roboto font

#10 Post by Ouaz »

Thanks for the explanation, Adrian.
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:
roboto_unhinted_W7.PNG
roboto_unhinted_W7.PNG (27.52 KiB) Viewed 10142 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.

Post Reply