Commit Graph
24 Commits
Author SHA1 Message Date
Eugene Sandulenko 940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Filippos Karapetis 5151ec0fe0 GRAPHICS: Silence an MSVC warning 2016-01-08 02:01:27 +02:00
Bastien Bouclet 2d86f6da9c GRAPHICS: Introduce a size mode for TrueType fonts
Allows to match Windows font size selection by converting font heights
to point sizes using the TrueType tables.
2015-12-21 18:41:14 +01:00
Matthew Hoops 75acef7566 GRAPHICS: Force a cast to int to avoid gcc warnings 2015-04-11 16:12:47 -04:00
Torbjörn Andersson 6f7b0311af GRAPHICS: Fix GCC signed/unsigned warnings. 2015-03-02 08:38:33 +01:00
Johannes Schickel 248ea3c1ab GRAPHICS: Allow negative xOffset in TTF.
This should improve the visual looks of many fonts. However, it might result
in the first line of the glyph to be drawn left of the position specified in
drawChar.
2014-09-03 22:55:48 +02:00
Johannes Schickel d55cd8f3b4 GRAPHICS: Allow to query the bounding box of chars/strings drawn with Font API. 2014-09-03 22:55:48 +02:00
Johannes Schickel 5b03ba04d7 GRAPHICS: Allow client code to specify TTF render mode.
This allows clients to use the default FreeType2 render mode instead of light.
We really only use light as default because that's what looks best with the
font we use in our GUI right now (which is the same reason why formerly light
was always used in non-monochrome mode).
2014-06-09 01:04:47 +02:00
Eugene Sandulenko 3e85976877 GRAPHICS: Initialize variable. CID 1133708 2013-12-01 00:51:09 +02:00
Johannes Schickel 09c634dd55 GRAPHICS: Allow TTFFont to cache glyphs when required.
This should allow TTFFont to display UTF-32 characters from fonts.
2013-11-23 21:34:54 +01:00
Johannes Schickel 13d470dc61 GRAPHICS: Get rid of _glyphSlots in TTFFont. 2013-11-23 21:34:54 +01:00
Johannes Schickel afa3f50b8a GRAPHICS: Let Font take uint32 as character codes.
This is required to support UTF-32 strings but does not make them work
automatically!
2013-11-23 21:34:54 +01:00
Johannes Schickel 5111746911 GRAPHICS: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +02:00
Johannes Schickel b4196e48b1 GRAPHICS: Add a DPI parameter to loadTTFFont.
Will be used by WME.
2012-08-09 03:13:00 +02:00
Johannes Schickel 3b212fdb51 GRAPHICS: Remove unused function ftFloor26_6 in ttf.cpp. 2012-05-03 23:25:00 +02:00
Alyssa Milburn b470c9af28 BASE: Free TTFLibrary singleton on shutdown.
This uses a helper function because TTFLibrary is internal.
2012-03-28 19:17:53 +02:00
Alyssa Milburn 92327c7991 GRAPHICS: Render TTF glyphs at the right locations.
Or at least using the fields used by the FreeType examples.
2012-03-19 23:00:14 +01:00
Alyssa Milburn 9a13b34549 GRAPHICS: Fix TTF glyph drawing at negative Y positions. 2012-03-19 22:57:48 +01:00
Johannes Schickel 66c3279b2f GRAPHICS: Obtain pointer to dst surface after bounds checks in TTF renderer.
This should really make sure we are not drawing outside the surface bounds.
2012-02-02 02:39:41 +01:00
Johannes Schickel 6402d30874 GRAPHICS: Use monochrome font hinter for TTF's monochrome loading. 2012-02-02 02:39:40 +01:00
Johannes Schickel f63df3bf7b GRAPHICS/GUI: Implement charset mapping for TTF fonts.
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.
2012-01-29 16:26:20 +01:00
Johannes Schickel 9f3fbe1bd7 GRAPHICS/GUI: Implement kerning support for Font.
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.
2012-01-29 16:26:20 +01:00
Johannes Schickel 843b9f9665 GRAPHICS: Add a TTF font class using FreeType2. 2012-01-29 16:26:20 +01:00