Commit Graph

165 Commits

Author SHA1 Message Date
frosch
dcec8b9abd (svn r25860) -Fix [FS#5737] (r25570): When clearing font cache, also clear layout cache. (adf88) 2013-10-13 13:28:06 +00:00
frosch
b4609fd923 (svn r25822) -Fix [FS#5704]: Searching for a suitable font failed, if one of the fonts had no '?' glyph, and no baseset is installed. 2013-10-06 20:08:11 +00:00
frosch
4824cb7886 (svn r25569) -Codechange: Cache all Font instances in a static container. 2013-07-06 18:56:23 +00:00
rubidium
fac0b83df6 (svn r25511) -Fix-ish: add the same printable key assert to the sprite font cache as the freetype font cache 2013-06-29 12:03:44 +00:00
rubidium
3831e3829d (svn r25501) -Fix: compilation error on OS X 2013-06-28 19:31:31 +00:00
rubidium
0c14a586bd (svn r25493) -Codechange: support for the safer variant of ICU's getFontTable 2013-06-27 21:21:47 +00:00
rubidium
7b10e39bf1 (svn r25469) -Add: method for getting the font tables from freetype fonts 2013-06-25 20:39:58 +00:00
rubidium
43a37f7f28 (svn r25463) -Codechange: export more size related information from the fonts 2013-06-25 20:21:21 +00:00
rubidium
092c33be3f (svn r25462) -Codechange: make a better distinction between characters and glyphs 2013-06-25 20:20:15 +00:00
frosch
798f472552 (svn r25451) -Fix (r25445): Ini configuration for medium font was overwritten by front configuration of other sizes. 2013-06-23 20:08:13 +00:00
rubidium
8190d26f9e (svn r25446) -Codechange: call sprite fontcache code from freetype font cache in case a sprite must be shown 2013-06-23 15:38:51 +00:00
rubidium
8c5a7cf0ab (svn r25445) -Codechange: simplify the font loading 2013-06-23 15:37:18 +00:00
rubidium
c23eaf0790 (svn r25444) -Codechange: move sprite font code together with the other sprite font code 2013-06-23 15:36:29 +00:00
rubidium
ac4dd5d627 (svn r25443) -Codechange: move the glyph to sprite cache into the FreeTypeFontCache instance 2013-06-23 15:35:06 +00:00
rubidium
d724088a1c (svn r25442) -Codechange: move height and ascender information into the FontCache instances 2013-06-23 15:32:09 +00:00
rubidium
eb4388f4f3 (svn r25441) -Codechange: move the freetype font allocation into the FreeTypeFontCache 2013-06-23 15:29:20 +00:00
rubidium
a285743d48 (svn r25439) -Codechange: move the glyph to sprite ID mapping into the SpriteFontCache 2013-06-23 15:25:35 +00:00
rubidium
e1a2a8275b (svn r25438) -Codechange: introduce classes for the FontCache 2013-06-23 15:24:36 +00:00
rubidium
94a5fe6b92 (svn r25437) -Codechange: rework the FreeTypeSettings structure to make it better grouped 2013-06-23 15:23:22 +00:00
rubidium
13c450a66b (svn r25436) -Codechange: split the font detection code out of the font caching code 2013-06-23 15:20:23 +00:00
michi_cc
55ba9320f3 (svn r25157) -Feature: Determine the default font height for vector fonts according to the minimum readable height that the font provides. 2013-04-06 22:06:44 +00:00
michi_cc
d1212e0b1a (svn r25153) -Fix [FS#5522] (r24487): [Win32] Don't statically link to SHGetFolderPath as it may not exist. 2013-04-06 18:36:41 +00:00
planetmaker
c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
alberth
732e073261 (svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb) 2012-12-01 13:12:39 +00:00
frosch
df54f25efe (svn r23987) -Fix (r23000): Also reset the font glyph cache when switching blitters. 2012-02-25 17:20:02 +00:00
michi_cc
e85d5b5d31 (svn r23889) -Codechange: Centralise sprite resizing in one place. (peter1138) 2012-02-04 13:29:13 +00:00
truebrain
b827694aec (svn r23592) -Fix (r23590): forgot one case 2011-12-18 19:39:24 +00:00
rubidium
ab974bee97 (svn r23582) -Fix [FS#4870]: add missing characters for certain languages and the large font
-Codechange: don't remove large font glyphs because they are broken in the original font, just fix them up in openttd.grf using action A
-Change: make extra characters more consistent with the original font
  All by PaulC.
2011-12-17 21:42:11 +00:00
rubidium
2ccbd2a6f5 (svn r23446) -Codechange: move _cur_palette and it's related first/count dirty variables into a single structure 2011-12-08 18:13:29 +00:00
glx
721c74d279 (svn r23381) -Fix (r23380): win9x compilation 2011-11-30 20:17:27 +00:00
glx
44918dded0 (svn r23380) -Add: monospace font detection for win32 (also ignore duplicates) 2011-11-30 17:05:14 +00:00
peter1138
81598273e9 (svn r23316) -Feature: Add ability to zoom in to 2x and 4x level. 2011-11-24 12:38:48 +00:00
peter1138
15d0a22aac (svn r23315) -Codechange: Only encode sprites for zoom levels that will be used. 2011-11-24 12:26:44 +00:00
rubidium
7f390964c3 (svn r23279) -Codechange: try to prevent slanted and skinny fonts with fontconfig. This should generally make the fallback choice better legible 2011-11-20 12:10:41 +00:00
rubidium
33f1636847 (svn r23277) -Codechange: fallback font support for fontcache 2011-11-20 12:02:06 +00:00
rubidium
9512838a5e (svn r23275) -Codechange: allow loading of the monospace (freetype) font at another moment than the other fonts 2011-11-20 11:59:36 +00:00
rubidium
dfefcab47d (svn r23274) -Add: internal support for a monospaced sprite font 2011-11-20 11:56:51 +00:00
rubidium
542c61397c (svn r23271) -Codechange: don't repeatedly initialise and free the freetype library 2011-11-20 08:08:13 +00:00
rubidium
d86e6b6162 (svn r23268) -Fix (r23267): compilation failed on Windows 2011-11-19 21:09:52 +00:00
rubidium
4e1c4f9079 (svn r23267) -Codechange: unify the font name setting of the font cache 2011-11-19 21:02:37 +00:00
rubidium
447884fddb (svn r23265) -Codechange: replace the setfallbackfont callback function with a class to call back 2011-11-19 18:43:00 +00:00
rubidium
4390f6f449 (svn r23243) -Codechange: give a clearer error when the sprite font failed to provide a sprite or fall back to the freetype font if that's loaded 2011-11-17 21:13:05 +00:00
peter1138
f0ef9a09ff (svn r23038) -Fix: Check that the selected font size is valid the font face in use and choose the nearest size to that selected if not. Font metrics should then just work. 2011-10-18 17:57:42 +00:00
peter1138
8a41530585 (svn r23009) -Change: Improve appearance of antialiased text with shadow. 2011-10-07 07:48:59 +00:00
michi_cc
65637d8941 (svn r22874) -Fix [FS#4747]: Check size of various buffers before allocation. (monoid) 2011-09-02 20:16:41 +00:00
frosch
fad00367ae (svn r21789) -Fix [FS#4405]: When the font misses the fallback character '?', use the sprite font's '?' instead. 2011-01-14 16:39:41 +00:00
rubidium
0575c8fec9 (svn r21475) -Fix: MSVC's code analyser says DeleteObject shouldn't be called with NULL 2010-12-12 11:34:01 +00:00
rubidium
4e78e7b6c2 (svn r21320) -Fix (r21298): somehow a semicolon got lost 2010-11-25 14:55:01 +00:00
glx
d9173858a2 (svn r21298) -Fix [FS#4261]: fonts set in openttd.cfg were not properly checked for missing glyphs on language change 2010-11-23 17:59:50 +00:00
planetmaker
b7d8001202 (svn r21197) -Fix [FS#4001] (r17794): [OSX] Finding a fallback font failed when compiling for OSX 10.4 as it tried to match also OpenTTD-specific control characters 2010-11-15 08:31:07 +00:00
frosch
4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch
ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth
a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
alberth
be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
rubidium
062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 2010-05-13 10:14:29 +00:00
rubidium
4c52a2cbd3 (svn r19753) -Fix [FS#3740]: try a bit harder to find a suitable font that can be loaded, i.e. while searching for a suitable font test whether you can open it and if not search further instead of always returning the first suitable font even when it can't be loaded 2010-05-03 00:00:34 +00:00
peter1138
51f5102713 (svn r18712) -Fix (r5167): Spurious character spacing with free type fonts for small and large font sizes. 2010-01-04 16:37:53 +00:00
glx
5ac036720b (svn r18564) -Fix: silence a warning 2009-12-20 14:05:58 +00:00
rubidium
b00a5f1069 (svn r18330) -Cleanup: remove some unneeded includes 2009-11-28 20:35:25 +00:00
peter1138
f28d32943d (svn r18096) -Fix (r5079/r7158??): Use free type ascender/descender metrics to position font offset correctly. 2009-11-15 14:39:37 +00:00
rubidium
860b9b1cea (svn r18028) -Codechange: unglobalise some functions 2009-11-09 10:40:33 +00:00
michi_cc
94003b455c (svn r17794) -Feature: [OSX] Implement automatic fallback font selection for OSX. 2009-10-17 22:36:43 +00:00
rubidium
d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium
bc8e66c202 (svn r17336) -Codechange: move some os specific files into src/os/ 2009-08-31 22:38:37 +00:00
rubidium
7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth
41c8baa7dc (svn r16612) -Fix (r16605): ASCII_LETTERSTART should be defined unconditionally (leeus) 2009-06-21 08:35:05 +00:00
alberth
0aed5bf7d7 (svn r16605) -Codechange: Move ASCII_LETTERSTART to the right source file. 2009-06-20 15:25:28 +00:00
alberth
8aa51823fc (svn r16604) -Codechange: Use FS_BEGIN for iterating over fonts. 2009-06-20 15:05:59 +00:00
peter1138
88ec646c1f (svn r16602) -Fix (r13831): Antialiased fonts broken; check pixel_mode instead of palette_mode. (Why did it work at some point?) 2009-06-20 09:35:22 +00:00
rubidium
f3262c76f0 (svn r15851) -Fix (r15849): compile failure when there's no freetype... 2009-03-25 21:35:22 +00:00
rubidium
e8d76e79ee (svn r15849) -Codechange: provide easy access to the real height of the used fonts 2009-03-25 20:01:34 +00:00
rubidium
56e7d2944b (svn r15818) -Fix [FS#2752]: some (newer) GCCs have trouble compiling the Win32 specific part of fontcache.cpp; jumps across variable declarations (Maeyanie) 2009-03-22 21:07:55 +00:00
glx
c0a4498518 (svn r15758) -Fix (r15757): win9x compilation 2009-03-18 00:55:10 +00:00
glx
5654966e75 (svn r15757) -Fix/hackaround (r15314): of course on some system searching a font using its english name fails. So now we search the font using the localised name and use the english name for the final 'validation' only. 2009-03-18 00:51:44 +00:00
rubidium
b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
rubidium
9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
glx
1692ce8312 (svn r15710) -Fix (r15706): for non MSVC io.h needs to be included before defining unlink. Also remove redundant tchar.h includes as it is already in stdafx.h. 2009-03-14 15:42:53 +00:00
rubidium
0c1b8ea602 (svn r15555) -Codechange: remove the mallocs + frees for temporary data from loading sprites. 2009-02-23 10:50:25 +00:00
smatz
d2716d66e3 (svn r15361) -Cleanup: minor comment style fixes (planetmaker) 2009-02-05 17:59:59 +00:00
rubidium
7e928974a7 (svn r15317) -Fix: support Windows fonts with non-ASCII characters in their file name. Windows doesn't come with them by default, but one can easily install a font with non-ASCII name. 2009-02-02 15:01:19 +00:00
glx
c6bc3b8692 (svn r15315) -Fix (r15314): make gcc happy (for once) 2009-02-02 13:44:19 +00:00
rubidium
ad210c7647 (svn r15314) -Fix/hackaround [FS#2590]: fonts have a feature where they can have localised names. Windows thinks it's a feature to use the name matching the system's locale, Windows doesn't provide an API to get the font name given another locale and freetype uses the English locale to resolve the name when opening the font... This results in fonts that will can't be found and warnings that the fallback font can't be loaded. Work around this by 'manually' getting the non-localised font name from the font. 2009-02-02 13:30:13 +00:00
smatz
0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
glx
b7c6872903 (svn r14622) -Fix (r14618): win9x compilation 2008-11-24 20:10:39 +00:00
rubidium
f7f89d63b2 (svn r14621) -Fix (r14618): link error when you aren't compiling for Windows or you don't have fontconfig. 2008-11-24 19:31:01 +00:00
glx
68d399d0ae (svn r14620) -Fix (r14618): missing lines broke compilation on windows 2008-11-24 18:59:53 +00:00
rubidium
fea78fbfbb (svn r14618) -Feature: when the chosen language isn't supported by the current font, try to find a font that does and use that instead. Thanks to glx/michi_cc for the Windows implementation. 2008-11-24 18:53:17 +00:00
rubidium
c8e8911ef6 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 2008-09-02 15:20:38 +00:00
peter1138
49c971c8eb (svn r13832) -Fix [FS#2152]: FreeType may return a bitmap glyph even if a grey-scale glyph was requested. 2008-07-26 10:21:26 +00:00
rubidium
d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
peter1138
eeeeeb9336 (svn r11981) -Fix [FS#1698]: Use unicode glyph mapping to fix up missing/shuffled sprites in original data files instead of shuffling or skipping
sprites directly. Some required glyphs were not loaded.
-Fix: Large capital U with grave (Ù) along with some other glyphs are broken in the original data files, so do no display them.
2008-01-25 13:48:39 +00:00
rubidium
d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 2008-01-13 01:21:35 +00:00
rubidium
a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 2008-01-07 14:23:25 +00:00
rubidium
429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium
bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 2007-12-25 09:48:53 +00:00
rubidium
a773d45885 (svn r11684) -Codechange: split gfx.h in a type and functional header. 2007-12-23 10:56:02 +00:00
rubidium
8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00
rubidium
01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 2007-12-21 19:21:21 +00:00
rubidium
f1e4914b5f (svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions. 2007-12-08 14:50:41 +00:00
skidd13
71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00