Commit graph

30 commits

Author SHA1 Message Date
Iris Morelle
e0d60b0e2b font: Remove dead code and WML previously associated to SDL_ttf
The [fonts] [font] WML was only used to set up SDL_ttf fonts. The engine
code to read it was left in after
2dfdc0061d in a dead state (some
structures are filled with data that never gets used).
2021-06-09 01:37:05 -04:00
Steve Cotton
01424cc853 Check which glyphs are in each font, instead of using a list hardcoded in WML
This is a "it's known to be broken, so let's rip it out and put in a minimal
replacement" change. Updated raw pointers to smart pointers just because,
updated the docs a bit, and ended up with a big change.

Fixes the most visible part of #5194, where Chinese needed DroidSansFallbackFull
to be loaded before DroidSansJapanese. The removed code in
`char_block_map::insert` and `char_block_map::compress` had a bug that
triggered when one font had a contiguous range of codepoints that was a
superset of several ranges in another font - this meant it treated the first
font containing U+4E00 as having the whole CJK Unified Ideographs block.

Remove the now-unused font codepoints WML. There is no schema change for this,
it seems the data/hardwired/fonts.cfg file isn't checked by the validation.

Optimise calling set_font_list with the same list (but possibly reordered), by
reusing the already-loaded fonts.
2020-10-10 17:36:10 +02:00
Charles Dang
f4a1abdb9b Fonts: added script font family 2018-02-14 14:39:51 +11:00
Charles Dang
6bd9740f53 Fonts: actually got light weight variant font support working
This replaces the broken implementation I added in fb6c85e70b.
See documentation in data/hardwired/fonts.cfg for explanation as to why it didn't work and
why this does.

Currently "light" is set to Lato Light, which is weight 300. Regular is weight 400.
2018-02-14 04:05:46 +11:00
Charles Dang
52cba5fc63 Enabled Lato for GUI1 and adjusted assigned sizes accordingly
Since GUI1 widgets seem to rely on the given font size values in font.hpp
for their dimensions, those are unchanged. ThemeWML-provided sizes were adjusted,
and larger sizes assigned to elements that were too small with the new font.

Theme element rects were also adjusted as necessary.
2016-05-18 08:05:02 +11:00
Martin Proud
30fefe488a Leaving Lato-Regular.ttf out due to GUI1 reasons
Eventually, we will add the font to the order list.
2016-03-30 02:23:48 -05:00
ancestral
353a9c38e7 Lato is now the new game font. Initially, this will be limited to GUI2, but as tech is updated in the project, we hope to make Lato the new default everywhere in the game. 2016-03-30 01:46:02 -05:00
Elvish_Hunter
4f2c15a065 Updated DejaVu fonts to version 2.35
The following codepoints were added:
* 1735 - 1736
* 1739
* 1744
* 3647
* 8381
* 9886 - 9887
* 43000 - 43001
* 64471 - 64472
* 64475 - 64479
* 64484 - 64487
2016-02-15 17:39:39 +01:00
Ignacio R. Morelle
4265527a90 ttext: Add support for selecting monospace font family
This selects DejaVu Sans Mono instead of whatever sans serif font is the
default for the current locale is. I'm not entirely sure what to do to
handle non-Western European languages since this is intended to be used
for displaying code or debug info anyway.

Because I can't be bothered to figure out how the codepoint fallback
works for GUI1, I'm only adding support for using this with the
Pango/Cairo ttext wrapper, which is used by GUI2. I'm also leaving it up
to fontconfig to find the correct font file for the font when selected.
Hopefully this will suffice for now.
2015-05-30 20:30:06 -03:00
Charles Dang
d9ed10acdb Fixed indent 2015-03-08 17:41:10 +11:00
Chris Beck
d4c1a42f89 add DejaVuSans-Bold font style for GUI1, help dialogs 2015-03-07 14:35:45 -05:00
Chris Beck
21bf262965 fix bug 22376: use DejaVuSans-Oblique for italicized characters 2015-03-07 14:35:45 -05:00
Charles Dang
59b57fab95 Updated DejaVu Sans to 2.34
The following codepoints were added:
* 8378
* 10858-10859
* 11807
* 42816-42817
* 42912-42922
* 128512
* 128529
* 128533
* 128535
* 128537
* 128539
* 128543
* 128550-128551
* 128558-128559
* 128561-128562
* 128564
2015-01-09 13:06:03 +11:00
Ignacio R. Morelle
fbd8f6ae59 Ran wmlindent 2012-01-11 21:49:32 +00:00
Nils Kneuper
46a34091c7 change the font used for CJK translations (part1) 2012-01-06 13:31:22 +00:00
Steven Panek
b6f1068b83 Cover a few missed parts of the Hangul Syllables plane. 2011-10-07 06:31:35 +00:00
Steven Panek
2033e95b30 Commented out the font loading code for Junicode,
...for there is no reason to try to load that font right now.
2011-06-19 17:21:43 +00:00
David Philippi
82b4d7ac77 complete update of DejaVuSans.ttf 2011-03-24 16:29:56 +00:00
Steven Panek
e9fd8a50f5 Did some reordering. 2011-03-20 11:35:06 +00:00
Steven Panek
3a767d8fff Cover the runic plane with Junicode. 2011-03-20 11:17:18 +00:00
David Philippi
d61a2d80e6 font update 2010-08-23 18:04:14 +00:00
David Philippi
df5d67fe00 font update 2010-06-26 15:20:48 +00:00
Guillaume Melquiond
7ee4d6a6dd Commented out old fonts,
...since their ranges are overwritten by the shipped ones. In other
words, they will never be used if the new ones are in scope. This also
gets rid of a warning message.
2009-12-23 10:05:41 +00:00
Nils Kneuper
d538132372 add files missing for Shavian translation 2009-10-08 15:17:30 +00:00
Guillaume Melquiond
c21ea970af Removed redundant unused file. 2009-04-26 08:29:54 +00:00
Nils Kneuper
eef3c27070 use the full version of wqy-zenhei...
...(http://sourceforge.net/projects/wqy/) as font for all asian translations

removed sazanami-gothic.ttf and wqy-zenhei-gb2312.ttf since they are
now obsolete

more information about this (inluding a list of covered languages by
wqy-zenhai) in this thread on the wesnoth-i18n mailling list:
http://mail.gna.org/public/wesnoth-i18n/2009-03/msg00018.html
2009-03-14 12:06:56 +00:00
Nils Kneuper
c680909cb7 copying the "normal" (modified) version over to the hardwired one...
...someone should check which one is actually used ingame and why
there are two (already mentioned it here in the hacking room at
fosdem)
2008-02-23 09:06:48 +00:00
Nils Kneuper
c19e3c2311 added a default textdomain definition to all .cfg files 2007-07-06 09:00:49 +00:00
Eric S. Raymond
08c6876453 Almost all WML files are now uniformly indented.
There are a few exceptions that need further work or careful
examination; UtBS, the tutorial, and the terrain macros.
2007-06-29 10:36:10 +00:00
Eric S. Raymond
9680f0084c All files with locations hardwired intgo C++ go into data/hardwired. 2007-05-15 20:56:42 +00:00
Renamed from data/fonts.cfg (Browse further)