Skip to content
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

add support for styled font families in GUI1, help dialogs #382

Merged
merged 7 commits into from
Mar 8, 2015
Merged

add support for styled font families in GUI1, help dialogs #382

merged 7 commits into from
Mar 8, 2015

Conversation

cbeck88
Copy link
Member

@cbeck88 cbeck88 commented Mar 7, 2015

This PR adds the Bold, Oblique versions of DejaVuSans to the fonts/ folder, and refactors the font database in font.cpp so that bold and oblique versions of fonts may be specified, overriding SDL_TTF's runtime glyph-transformation styling when these are available. The styled fonts are specified in data/hardwired/fonts.cfg in the [font] tags using bold_name, italic_name optional attributes.

This fixes bug #22376.

This commit allows bold and italic font files to be specified in
the fonts.cfg file. When attribute "bold_name" is set to the name
of a font file, this font will be used in place of SDL TTF bold-
styling applied to the base font. Similarly for "italic_name".

This commit assumes that the code points for the styled versions
are the same as for the unstyled version. If that assumption is
not true for some font that we care about then this commit will
likely have to be revised.
with ideas from aquileia
this is a small optimization
cbeck88 added a commit that referenced this pull request Mar 8, 2015
add support for styled font families in GUI1, help dialogs
@cbeck88 cbeck88 merged commit 1bc7471 into wesnoth:master Mar 8, 2015
@cbeck88 cbeck88 deleted the font_family branch March 8, 2015 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant