Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Dec 12, 2017 11:46 pm

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Oct 06, 2017 2:52 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Apr 02, 2010 1:01 pm
Posts: 30
Location: Rotterdam, The Netherlands
Hi there. Anybody know what I'm doing wrong here? I'm trying to use the Japanese town names NewGRF but I can't seem to get the fonts working properly.

My current settings:

Code:
small_font = /Library/Fonts/Arial Unicode.ttf
medium_font = /Library/Fonts/Arial Unicode.ttf, Bold
large_font = /Library/Fonts/Arial Unicode.ttf, Bold
mono_font = /Library/Fonts/Arial Unicode.ttf, Bold
small_size = 12
medium_size = 12
large_size = 16
mono_size = 12
small_aa = true
medium_aa = true
large_aa = true
mono_aa = true


When zoomed in, I see question marks. However, when I zoom out, the font is visible. I'm not sure what I'm doing wrong here that makes the font show up correctly on some zoom levels, but not on others.

Really appreciate any help you can give me. :D


Top
   
PostPosted: Fri Oct 06, 2017 3:13 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4514
Location: home
Likely the font does not exist in all zoomed sizes that you request.

Edit: While we see it as a single font in different sizes, printers see each size as as a different font, and this is also how these files are constructed.
So the file contains only fonts that are (in your view) 'small' or 'big' depending on your zoom setting when you see the font. The other kind uses a font that is not available in the file.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
PostPosted: Sun Oct 08, 2017 12:56 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Apr 02, 2010 1:01 pm
Posts: 30
Location: Rotterdam, The Netherlands
Thanks for your reply!

I must admit your reply actually had me a bit confused, since you said "printers see each size as a different font." I'm thinking now you probably meant that each individual weight is a different font? Upon closer inspection it turns out that Arial Unicode doesn't have a bold weight so that's why it wasn't working.

I've now changed all my fonts to Hiragino Sans W5 and that works very well.

There's another weird thing, though... after this I switched the interface language to Japanese as well, but then the font changed. No matter what font I set, it uses a different one if I use Japanese. Maybe a built in font?
Here's the English and Japanese screenshots. Note the difference in the window title and the word "NewGRF".


Top
   
PostPosted: Sun Oct 08, 2017 2:42 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4514
Location: home
Not builtin in OpenTTD, the sprite font that it has only supports the 4 original Western languages, maybe some library does something smart there, no idea.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.