Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory
2022-12-01 11:53:02 +01:00
sluicebox
2775987cba
MACGUI: Expose font families in MacFontManager
...
MacFontManager didn't have a mechanism to report which fonts it loaded
from an external resource. It also requires that any fonts that aren't
built-in be explicitly registered by name by the client before they can
be used. This combination meant that a client couldn't load fonts from
an external file and use them by their properties (id / size / style).
SCI contains Mac fonts in its executable along with a table that maps
each SCI font id to a Mac font id and size. The font name isn't a part
of this since the Classic Mac Toolbox API took id / size / style as
input when drawing text.
Now MacFontManager exposes the font families it has loaded along with
their names. This allows a client to see which fonts were loaded,
register them by name, and proceed to use them with the existing API.
2022-11-06 23:05:20 -08:00
Scott Percival
095ae06405
COMMON: Refactor MacResManager::load* methods to accept a pointer
...
Previously the methods would pass by reference, then convert to a
pointer on success and take ownership. This isn't ideal, as a
reference suggests no transferral of ownership, and doesn't suggest
it needs to be a heap resource allocated by new.
2022-09-25 10:35:03 +02:00
Roland van Laar
034a5efe98
DIRECTOR: Fix memory leak in registered FONDs
...
References to FOND resource streams are stored in an array.
Font streams were registered by their family name in a hashmap.
When a second font with the same name was encoutered it would replace
the pointer to the previous font.
The only use case for the hashmap was to register the stream to be able
to later close them.
2022-09-24 16:37:27 +02:00
Le Philousophe
8ec9835358
GRAPHICS: Initialize _japaneseFontsLoaded before it's used
2022-09-18 16:15:56 +02:00
Le Philousophe
e020710d5d
GRAPHICS: Free WinFont when erroring out
2022-09-18 16:15:56 +02:00
Pragyansh Chaturvedi
5c17fe70b8
JANITORIAL: Fix conventions and reimplement MacFontManager::rectifyId()
2022-07-17 13:04:14 +02:00
Pragyansh Chaturvedi
c4f6aa89b9
GRAPHICS: Implement assigning of windows font, check for wrong fontId while loading stxt, read name from FON files DIRECTOR
2022-07-17 13:04:14 +02:00
Pragyansh Chaturvedi
8cb2e1bb07
GRAPHICS: Add rectifyId to check for changed font IDs
2022-07-17 13:04:14 +02:00
Pragyansh Chaturvedi
94848be816
GRAPHICS: Set MacText->_defaultFormatting values after generating font
2022-07-17 13:04:14 +02:00
Pragyansh Chaturvedi (r41k0u)
f241bdefd3
DIRECTOR: LINGO: Implement kTheTextFont, kTheTextStyle, kTheTextHeight and kTheTextSize in Lingo::setField()
2022-06-06 18:32:14 +02:00
Donovan Watteau
5b1ec56f96
JANITORIAL: Fix some lost or outdated URLs in comments
2022-05-19 07:57:31 +03:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
djsrv
40c8ab4724
GRAPHICS: MACGUI: Fix registering font to preferred ID
2021-08-06 08:56:32 -04:00
djsrv
ad780d761c
GRAPHICS: MACGUI: Handle TTF fonts with slant
2021-07-30 16:43:57 -04:00
djsrv
29197c191c
GRAPHICS: MACGUI: Fix font memory leaks
2021-07-30 16:43:57 -04:00
ysj1173886760
3d0b7d5130
GRAPHICS: MACGUI: modify the parameter of scaleFont in macFont
2021-07-23 17:06:38 +08:00
djsrv
ea7d098913
GRAPHICS: MACGUI: Clean up comments
2021-07-12 18:02:56 -04:00
djsrv
6621b6121d
GRAPHICS: MACGUI: Fix ID at which Japanese fonts start
2021-07-12 18:02:56 -04:00
djsrv
de929228c4
GRAPHICS: MACGUI: Add Japanese mode
2021-07-12 18:02:56 -04:00
djsrv
ad79812cc6
GRAPHICS: MACGUI: Introduce font aliases
...
Easy way of adding more font IDs and names for the same font.
2021-07-12 18:02:56 -04:00
djsrv
0c053d20ba
GRAPHICS: MACGUI: Replace kMacCentralEurope with kMacRoman
2021-07-12 15:41:21 -04:00
djsrv
354e344b4d
GRAPHICS: MACGUI: Start IDs for new font registrations at 100
...
Makes it clearer that these are not system fonts.
2021-07-12 15:41:21 -04:00
djsrv
68426370f3
GRAPHICS: MACGUI: Don't register font name in loadFonts
...
We don't know a font's preferred ID at this point. We must get that from
the Director movie's font map.
2021-07-12 15:41:15 -04:00
djsrv
9fe78bc54d
GRAPHICS: MACGUI: Fix unregistered font segfault
2021-07-12 01:33:16 -04:00
djsrv
f4d2b75342
GRAPHICS: MACGUI: Set default encodings in registerFontName
2021-07-12 00:38:05 -04:00
djsrv
2e3b08017f
GRAPHICS: MACGUI: Whitespace cleanup
2021-07-12 00:38:05 -04:00
djsrv
acb3ace45e
GRAPHICS: MACGUI: Detect Japanese fonts from preferred ID
2021-07-12 00:38:05 -04:00
djsrv
71d4127b8a
GRAPHICS: MACGUI: Store font lang and encoding
2021-07-12 00:38:05 -04:00
djsrv
ed406150c2
GRAPHICS: MACGUI: Add font name from Alan Kay demo
2021-07-12 00:38:05 -04:00
djsrv
53f600846b
GRAPHICS: MACGUI: Fix fallback of Japanese fonts to Osaka
2021-07-12 00:38:05 -04:00
djsrv
b57f6d8b7f
GRAPHICS: MACGUI: Allow fonts to be registered to a preferred ID
2021-07-12 00:38:05 -04:00
djsrv
f39e6eaac7
GRAPHICS: MACGUI: Add Japanese font info
2021-07-12 00:38:05 -04:00
djsrv
b7c40b3d37
GRAPHICS: MACGUI: Create font info dictionary
2021-07-12 00:38:05 -04:00
djsrv
e9d9b9f569
DIRECTOR: Revert FXmp handling
...
This reverts commit 4dabee7e8b .
This reverts commit 3fda461d5f .
This reverts commit 831c014f9e .
This reverts commit b3b55e59e9 .
2021-07-06 16:47:20 -04:00
djsrv
3fda461d5f
GRAPHICS: MACGUI: Handle FontXPlatformMap in MacFontManager::getFont
2021-07-05 22:54:14 -04:00
djsrv
58ab956d72
GRAPHICS: MACGUI: Don't allow font IDs to be overridden
...
New fonts are automatically assigned a unique ID.
2021-07-02 18:08:21 -04:00
ysj1173886760
93421af649
GRAPHICS: MACGUI: clean the code and write comments for readability
2021-06-20 14:33:53 +02:00
ysj1173886760
3098ff11b4
GRAPHICS: MACGUI: parse slant directly from name when we didn't get any slants.
2021-06-20 14:33:53 +02:00
Henrik "Henke37" Andersson
2300f0a7d4
MACGUI: Use getValOrDefault
2021-02-12 00:41:23 +01:00
Eugene Sandulenko
952c4c98ee
GRAPHICS: MACGUI: Try to generate different font slant first
2020-07-05 22:45:46 +02:00
Eugene Sandulenko
25c1e4a590
MACGUI: Restrict TTF font generation to regular fonts only
2020-07-05 22:45:07 +02:00
Eugene Sandulenko
561052c476
GRAPHICS: MACGUI: Fix bug when we stopped loading font family after TTF font
2020-07-05 22:42:49 +02:00
djsrv
20e29b2198
GRAPHICS: MACGUI: Load TrueType fonts
2020-06-29 22:11:13 -04:00
Eugene Sandulenko
dd21ddbe15
GRAPHICS: MACGUI: Plug potential memory leak
2020-04-27 13:57:35 +02:00
Eugene Sandulenko
d9a11fdf76
GRAPHICS: MACGUI: Fix searching for next bigger font in MacFontManager
2020-04-27 13:57:35 +02:00
Eugene Sandulenko
39ad4d4e02
GRAPHICS: MACGUI: Request outline fonts generation
2020-03-22 17:40:59 +01:00
Eugene Sandulenko
988daefade
GRAPHICS: MACGUI: Parse slant in extra fonts too
2020-02-16 15:53:19 +02:00
Eugene Sandulenko
8df4d8a339
GRAPHICS: MACGUI: Proper processing of font slant names
2020-02-16 15:53:19 +02:00
Eugene Sandulenko
96912ee3f1
GRAPHICS: MACGUI: Moved Font::setName() method implementation out of the header
2020-02-10 15:05:46 +01:00