GDI32: freetype.c add more font selecting&linking mechanism support.

Byeong-Sik Jeon wjsqudtlr at gmail.com
Tue Mar 7 01:29:04 CST 2006


ChangeLog:
	- add more font selecting & linking mechanism support.

Hi, all.

This patch helps more less "handed" modify of config file(system.reg,
user.reg) at various user environment. If we have right fonts, we will
see right shape(not retangle box).

1.
static Face *find_face_from_filename(const WCHAR *name); =>
static Face *find_face_from_filename(const CHAR *name, const INT
face_index);

2.
init_system_links().
FIXME("don't yet handle ttc's correctly in linking.  Assuming index 0
\n"); is removed. I add support of .ttc. file. It's possible with
following line:
---------------------------------------------------------------
HKLM:
[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontLink\\SystemLink]
"Tahoma"=str(7):"Arial.ttf\0Gulim.ttc, Dotum\0Batang.ttc,   \0"
----------------------------------------------------------------
and, I add some basic registry value. "Tahoma", "Gulim", "MS UI Gothic",
"Simsun", "PMingLiU".

3.
WineEngCreateFontInstance(), create_child_font_list(),
get_nearest_charset()

- add some font selecting mechanism. If we can't find matched-font on
lfFaceName,  FaceName of "linked-font, lfPitchFamily, defSystem, ..."
have more big priority than simply sequential searched font. 

- If lfCharSet == DEFAULT_CHARSET then use the current ansi codepage.
and If selected font is not support current ansi codepage, then it fixup
the problem in "create_child_font_list()" function.
 
- fix fake_italic, fake_bold bad value setting problem on some
condition.
Example: Tahoma have regular and bold face. When LOGFONT is "Tahoma
Italic", at some environment, fake_italic=1,fake_bold=0 and
fontfilename="Tahoma Bold.ttf". it's bad result. This patch is fix this
problem.

4. 
load_child_font()

pass the information lfWeight, lfItalic, 
and set child->font->fake_italic, child->font->fake_bold.



CF.
Some programs(Ex, Picasa2, its cute button) directly call
GetGlyphOutline( ~= WineEngGetGlyphOutline). this function is not
support font-linking mechanism yet. this problem can be solved with any
simple patch to WineEngGetGlyphOutline(), but I'm careful....

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetype.c_060307.diff
Type: text/x-patch
Size: 30954 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060307/66d39b98/freetype.c_060307-0001.diff


More information about the wine-patches mailing list