185 Commits

Author SHA1 Message Date
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
Torbjörn Andersson
29a6b30ec3 GRAPHICS: Fix build 2022-03-29 09:01:47 +02:00
Paul Gilbert
3989d2652b AGS: Compilation fix 2022-03-28 22:45:52 -07:00
Paul Gilbert
accd508b9c GRAPHICS: Create set of wrapper functions for accessing FreeType directly 2022-03-28 20:29:36 -07: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
Orgad Shaneh
7a4e5612de JANITORIAL: Replace new[]/memset with new[]()
Mostly done using the following Ruby script:

(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
  s = File.read(file, encoding: 'iso8859-1')
  t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
  if t != s
    File.open(file, 'w') { |io| io.write(t) }
  end
end
2021-11-10 19:53:15 +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
Marcus Comstedt
20eb91cb31 GRAPHICS: Add Latin Extended-A to GUI font
This fixes incorrectly rendered characters in the about crawler.

The following BDF file was used as source:
https://opensource.apple.com/source/X11fonts/X11fonts-10.2/font-adobe-75dpi/font-adobe-75dpi-X11R7.0-1.0.0/helvB12.bdf
2021-10-23 09:45:15 +02:00
Thierry Crozat
3e1c61cdb8 GRAPHICS: Support loading a Windows font from an existing stream 2021-09-24 23:42:18 +01:00
ysj1173886760
948604d79d GRAPHICS: MACGUI: text length should not bigger than maxWidth - 1 2021-07-29 12:04:20 +08:00
ysj1173886760
a2d453a8f9 GRAPHICS: MACGUI: don't apply the kerning offset for the generated font
because we have already applied it when we are generating the font.
2021-07-26 20:55:49 +08:00
ysj1173886760
238971bc46 GRAPHICS: MACGUI: initialize slant of macFontfont. 2021-07-23 18:16:22 +08:00
ysj1173886760
7e2f3edc61 GRAPHICS: MACGUI: initialize bitImage to 0. 2021-07-23 17:06:38 +08:00
ysj1173886760
dc8418b547 GRAPHICS: MACGUI: implement shadow font. 2021-07-23 17:06:38 +08:00
ysj1173886760
1d7e82bf3e GRAPHICS: MACGUI: amend makeOutline 2021-07-23 17:06:38 +08:00
ysj1173886760
cae8166101 GRAPHICS: MACGUI: organize the code for extension. 2021-07-23 17:06:38 +08:00
ysj1173886760
822ca12ab2 GRAPHICS: MACGUI: draw the underLine in kerning area when we are dealing with underLine font. 2021-07-23 17:06:38 +08:00
ysj1173886760
0aa7518c5b GRAPHICS: MACGUI: set the kerning offset to 0 when dealing with underLined space. 2021-07-23 17:06:38 +08:00
ysj1173886760
6752b923b9 GRAPHICS: MACGUI: amend makeOutline in macFont. 2021-07-23 17:06:38 +08:00
ysj1173886760
e434198924 GRAPHICS: MACGUI: implement underline font. 2021-07-23 17:06:38 +08:00
ysj1173886760
3d0b7d5130 GRAPHICS: MACGUI: modify the parameter of scaleFont in macFont 2021-07-23 17:06:38 +08:00
ysj1173886760
4dd8e71fb9 GRAPHICS: MACGUI: fix outline style font. 2021-07-22 21:42:19 +08:00
ysj1173886760
e02911f283 GRAPHICS: MACGUI: add 1 to the width of outline font. 2021-07-22 21:42:19 +08:00
ysj1173886760
9ec4a2449e GRAPHICS: MACGUI: using bitmapWidth to replace width when dealing with bitmap. 2021-07-22 21:42:19 +08:00
ysj1173886760
63b9ae3679 GRAPHICS: MACGUI: enhance italic font. Fix the implementation for generating slant fonts. 2021-07-22 21:42:19 +08:00
ysj1173886760
79755cfb02 GRAPHICS: MACGUI: implement basic italic supporting. 2021-07-22 21:42:18 +08:00
ysj1173886760
a319074c86 GRAPHICS: MACGUI: add kerning offset when drawing single char 2021-07-20 16:49:01 +08:00
ysj1173886760
296750d5de GRAPHICS: MACGUI: implement reading styleWidths and glyph-width table for macfont 2021-07-20 16:49:01 +08:00
ysj1173886760
e24b22ed56 GRAPHICS: MACGUI: eliminate some TODO in load macFontFamily 2021-07-20 16:49:01 +08:00
Eugene Sandulenko
537e654138
GRAPHICS: TTF: Support loading fixed size fonts 2021-05-01 01:49:46 +02:00
Cameron Cawley
8dda238e6a GRAPHICS: Avoid modifying the built-in Topaz font data 2021-04-18 15:28:51 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Eugene Sandulenko
55ed48afba
GRAPHICS: Fix 16-bpp rendering for AmigaFont 2021-04-15 21:20:35 +02:00
Eugene Sandulenko
4d75629be1
GRAPHICS: Expose first and last character code for AmigaFont 2021-04-15 17:45:37 +02:00
Eugene Sandulenko
12b3708fa1
GRAPHICS: Make AmigaFont universal 2021-04-15 17:45:37 +02:00
Eugene Sandulenko
925d9d250d
GRAPHICS: Fixes to AmigaFont drawing 2021-04-15 17:45:37 +02:00
Eugene Sandulenko
24596bc806
GRAPHICS: Font class for drawing Amiga Topaz font 2021-04-15 17:45:37 +02:00
Torbjörn Andersson
2fb992ed4e GRAPHICS: Clip Mac font glyphs to the destination surface
This was probably causing instabilities in the MacVenture engine. The
engine is pretty broken at the moment, and the command window is so
small that text doesn't fit in it at all. Hopefully this will make the
remaining errors easier to debug... some day.
2021-04-04 10:23:20 +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
Eugene Sandulenko
b221999e1e GRAPHICS: Allocate more memory on generating scaled Mac fonts 2020-08-17 00:50:56 +02:00