Filippos Karapetis
4e7752b923
GRAPHICS: Use C++ 11 range-based for loops
2025-03-27 13:47:57 +08:00
tunnelsociety
b792ba090d
GRAPHICS: Handle seek-only case in TTFLibrary readCallback
...
As documented in FreeType API Reference. This avoids passing
a null buffer to ttfFile->read().
2024-12-19 22:51:20 +02:00
sluicebox
cd755fc663
GRAPHICS: Fix memory leak in TTF font
2024-08-25 12:26:47 -07:00
Cameron Cawley
7e0dfe0081
GRAPHICS: Use custom stream callbacks for loading TTF fonts
2024-07-23 15:33:43 +01:00
Cameron Cawley
f3fbd2477c
GRAPHICS: Allow specifying separate xdpi and ydpi values in loadTTFFont
2024-01-08 23:41:50 +01:00
Le Philousophe
226de788c8
GRAPHICS: Make API use the Path class
2023-12-24 13:19:25 +01:00
Le Philousophe
802c91554f
COMMON: Make extrapath a Path object
2023-12-24 13:19:25 +01:00
Eugene Sandulenko
b7fd4cb8af
GRAPHICS: Fix crash while trying fonts-cjk.dat
2023-12-09 15:33:16 +01:00
Eugene Sandulenko
0e18527d36
GRAPHICS: Use fonts-cjk.dat for loading path
2023-11-20 20:59:17 +01:00
Cameron Cawley
08375cafdf
GRAPHICS: Improve TTF rendering quality with RGB332 surfaces
2023-02-07 23:42:42 +01:00
Le Philousophe
b8f1f64d00
GRAPHICS: Delete archive when it's not needed
2023-01-26 07:42:48 +01:00
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory
2022-12-01 11:53:02 +01:00
Donovan Watteau
5b1ec56f96
JANITORIAL: Fix some lost or outdated URLs in comments
2022-05-19 07:57:31 +03:00
Thierry Crozat
43acda0c9a
GRAPHICS: Add override for TTFont class
2022-04-05 23:18:05 +01:00
Paul Gilbert
15704239b8
AGS: Properly implement alfont_get_name
2022-03-14 22:12:40 -07:00
Paul Gilbert
a2a33b8f19
GRAPHICS: Added getFontName method to TTFFont
2022-03-14 21:57:14 -07:00
Le Philousophe
a110714141
GRAPHICS: Remove superfluous memset
...
Surface::create already initialized memory to 0 and getPixels can be
nullptr if bitmap size is 0. In this case memset gets called with
nullptr which is undefined behaviour.
2022-01-06 19:39:05 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Alexandre Detiste
6044504762
JANITORIAL: typos
...
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Eugene Sandulenko
537e654138
GRAPHICS: TTF: Support loading fixed size fonts
2021-05-01 01:49:46 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs
2021-04-15 21:20:36 +02:00
Thierry Crozat
a3f3d71c57
GRAPHICS: Expose ascent value in font class
2021-03-23 20:25:23 +00:00
Paul Gilbert
4142f7b7f8
GRAPHICS: Allow TTFFont to handle ManagedSurfaces with transparent pixels
2021-02-26 17:58:19 -08:00
Matthew Jimenez
286cccdafe
GRAPHICS: Update TTF render color blending to work with any surface alpha level
2021-02-21 15:30:30 +00:00
Matthew Jimenez
85854120fa
GRAPHICS: Improve TTF rendering on transparent surfaces.
...
Update color blending to match blending found in ManagedSurface. TTF rendering assumed the alpha channel of the surface was completely opaque. ULTIMA8 TTF rendering attempts to use a transparent surface and became near-illegible for text on scrolls. This change will affect TTF rendering on surfaces that are not already painted.
2021-02-21 15:30:30 +00:00
Le Philousophe
b093c9d6b5
GRAPHICS: Fix decoding of TTF font names
...
This fixes a buffer overflow when decoding font Unicode name as length
provided to decodeUTF16BE is in code units and not in bytes (twice less).
2020-12-01 20:03:07 +01:00
Vladimir Serbinenko
68a9136e4d
COMMON: Rewrite Encoder and drop dependency on iconv ( #2586 )
...
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.
It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
Paweł Kołodziejski
d05d4df9e0
GRAPHICS: Added support for stem darkening in TTF
2020-09-23 23:44:35 +02:00
Le Philousophe
8e156fe37d
GRAPHICS: Fix compilation on old FreeType2 versions
...
Old FreeType2 had FT_Bitmap_New which got renamed later in FT_Bitmap_Init
2020-03-14 16:56:25 +01:00
Le Philousophe
3f7726ea66
GRAPHICS: Fix compilation for Amiga and PSP
...
Amiga failed because int isn't the same than int32
PSP failed because of an old FreeType version so try to take this
into account
2020-03-14 14:23:34 +01:00
Le Philousophe
ee1aa81063
GRAPHICS: Mimic CreateFont Windows API
...
Implement a kind of font mapper which takes a list of font files, font
face name, size, slant and weight and finds the best matching face.
Fakes italic and bold if there it isn't available.
This commit adds support for TTC files which contains multiple faces
(used by CJK Windows fonts).
2020-03-14 12:19:21 +01:00
D G Turner
be56e9afed
GRAPHICS: Fix Missing Default Switch Cases
...
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 10:11:25 +00:00
Bastien Bouclet
6a231e4b60
GRAPHICS: Look for fonts.dat in extrapath
...
When running from the source tree, it is convenient to have extrapath
set to dists/engine-data, where fonts.dat is located.
2019-05-01 05:50:08 +02:00
Cameron Cawley
fa60ae728e
GRAPHICS: Add a function to load TrueType fonts from fonts.dat
2018-12-25 12:47:42 +01:00
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