-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: TTF support in our GUI #163
Conversation
Couple of questions: 1. Does it provide antialiased fonts? 2. Any screenshots? |
Currently AA is always enabled though. |
The output looks good to me. As far as the PS3 is concerned, FreeType2 is a reasonable dependency. |
The look is cool, but I don't like Verdana in this context. Fonts from original mock-ups look the best IMHO: http://scummvm.svn.sourceforge.net/viewvc/scummvm/media/trunk/originals/gui/scummvm5.png?revision=56141&view=markup |
Yeah, I just used Bistream Vera as an example, since it's a free font. It wasn't meant to be the final font. I don't like it that much either to be honest. But for a quick check it's fine IMHO. The bold version of the standard Vera font might be a bit more similar to what we currently have: http://lordhoto.users.sourceforge.net/scummvm-aa-bd.png If we can find a better (free) font we can use, then it would definitly be cool. I am not sure what the font used for the mock-ups is though, so it's hard to say whether we can use it. EDIT: If you have a nicer font you want me to try I could put up some screens for that. |
Ok I added support for using non ISO-8859-1 charsets now. One problem with the current Vera font is that it doesn't support some chars of ISO-8859-2, thus all languages using that will fall back to the bdf font, and it doesn't support much of the ISO-8859-5 at all, thus it will fallback to the bdf version too. |
I cleaned up some code parts and rebased the code on the current master. The most notable change is that we use filenames instead of basenames for font files in our themes again. |
Did another bunch of changes:
|
Fixed a font redrawing issues in the anti-aliased font drawing, which caused some texts to get thicker when you hover over them a few times. I also made a few more comparison screenshots: Arial (proprietary and thus we cannot use it, just for reference since sev suggested it): http://lordhoto.users.sourceforge.net/scummvm-arial.png These three above are 12pt. GNU FreeFont 10pt: http://lordhoto.users.sourceforge.net/scummvm-freefont-10.png Personally I think FreeFont 12pt looks fine, everything below is just too small. |
@lordhoto: Out of those, DejaVu LGC Serif and GNU FreeFont (12pt) look the best to me. |
For comparison to be fair you should use bold fonts. So far GNU FreeFont 12pt is my favorite. |
Bold versions (all 12pt again): Arial Bold: http://lordhoto.users.sourceforge.net/scummvm-arial-bold.png I checked our current fonts again and it seems the "big" GUI font is bold, while the normal one isn't. A quick check shows that we will probably need to reduce the point size to 10 for 320x200 otherwise the text won't fit. |
I recreated the bold versions, since I noticed some annoying oddity in the FreeSans bold version. It seems the default hinter in FreeType made the "t" look like it was cut off on the right side, since it used quite high alpha values, now I am using the light render mode, which uses the auto-hinter, which makes the fonts look a bit nicer imho. |
This adapts the related graphics code, which is the generic Font API and the TTF font implementation. It furthermore adapts the GUI to properly take care of kerning in text input widgets.
The charsets used by the translations now need to have a "$(name).cp" file, which contains an charset index => unicode mapping. Otherwise create_translations will fail.
Formerly the text background was not restored thus every time it got redrawn the text got thicker.
I added GNU FreeFont as default now. The big font is FreeSansBold.ttf 12pt now, the small font FreeSans.ttf 11pt. Here are screenshots of the new looks: Screenshots of our old GUI as comparison: If nobody raises any complaints, I will merge this tomorrow afternoon/evening. |
Wow, just wow! Please merge. |
Rebased it on master again and pushed it as 5407bb8..e4b1067. Closing this pull request now. |
As the description already states, this pull request intends to get your opinions about TTF support for our GUI. It is definitely not in a state to be merged right now.
This adds a new (optional) dependancy on FreeType2 for the TTF support. I added Bitstreams Vera to our modern theme, so people can give this a try easily.
The big question is: Do we want this? I.e. are we fine with optionally depending on FreeType2?
I wouldn't want to talk too much about implementation details here, since there's already a few things I want to tackle: