fonts: Add the Won sign in place of the backslash for Korean fonts.

oldstable
Huw Davies 2006-04-07 10:28:30 +01:00 committed by Alexandre Julliard
parent 12a9ed0ade
commit 26dbcc0aee
2 changed files with 27 additions and 9 deletions

View File

@ -39,13 +39,12 @@ ScriptLang: 2
LangName: 1033 "" "" "" "" "" "" "" "" "Created with FontForge 1.0 (http://fontforge.sourceforge.net)" "Huw D M Davies" "" "http://www.winehq.org" "" "This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.+AAoA +AAoA-This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.+AAoA +AAoA-You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA+AAoA" "http://www.gnu.org/licenses/lgpl.html"
Encoding: UnicodeBmp
UnicodeInterp: none
NameList: Adobe Glyph List
DisplaySize: 16
AntiAlias: 0
FitToEm: 1
WinInfo: 836 19 18
WinInfo: 0 19 18
OnlyBitmaps: 1
BeginChars: 65536 347
BeginChars: 65536 348
StartChar: space
Encoding: 32 32 0
Width: 4
@ -1847,17 +1846,23 @@ EndChar
StartChar: afii10023
Encoding: 1025 1025 345
Width: 9
Flags: HW
Flags: W
TeX: 97 0 0 0
EndChar
StartChar: afii10071
Encoding: 1105 1105 346
Width: 8
Flags: HW
Flags: W
TeX: 97 0 0 0
EndChar
StartChar: uni20A9
Encoding: 8361 8361 347
Width: 9
Flags: W
TeX: 117 0 0 0
EndChar
EndChars
BitmapFont: 16 347 13 3 1
BitmapFont: 16 348 13 3 1
BDFChar: 0 32 4 14 14 0 0
z
BDFChar: 1 33 4 1 2 0 9
@ -2552,5 +2557,7 @@ BDFChar: 345 1025 9 1 7 0 12
bfg(d^qdb`^qdb$rVuou
BDFChar: 346 1105 8 1 6 0 9
bfg'3bfojtb]j*f
BDFChar: 347 8361 9 0 8 0 9
@fU9ECB/,Ms+"kbCB/haG5rfe
EndBitmapFont
EndSplineFont

View File

@ -179,6 +179,15 @@ static int lookup_charset(int enc)
return OEM_CHARSET;
}
static int get_char(const union cptable *cptable, int enc, int index)
{
/* Korean has the Won sign in place of '\\' */
if(enc == 949 && index == '\\')
return 0x20a9;
return cptable->sbcs.cp2uni[index];
}
static void fill_fontinfo(FT_Face face, int enc, FILE *fp, int dpi, unsigned char def_char, int avg_width)
{
int ascent = 0, il, ppem, descent = 0, width_bytes = 0, space_size, max_width = 0;
@ -282,10 +291,11 @@ static void fill_fontinfo(FT_Face face, int enc, FILE *fp, int dpi, unsigned cha
os2 = FT_Get_Sfnt_Table(face, ft_sfnt_os2);
for(i = first_char; i < 0x100; i++) {
gi = FT_Get_Char_Index(face, cptable->sbcs.cp2uni[i]);
int c = get_char(cptable, enc, i);
gi = FT_Get_Char_Index(face, c);
if(gi == 0)
fprintf(stderr, "Missing glyph for char %04x\n", cptable->sbcs.cp2uni[i]);
if(FT_Load_Char(face, cptable->sbcs.cp2uni[i], FT_LOAD_DEFAULT)) {
if(FT_Load_Char(face, c, FT_LOAD_DEFAULT)) {
fprintf(stderr, "error loading char %d - bad news!\n", i);
continue;
}
@ -365,7 +375,8 @@ static void fill_fontinfo(FT_Face face, int enc, FILE *fp, int dpi, unsigned cha
fwrite(dfCharTable + fi.dfFirstChar, sizeof(*dfCharTable), ((unsigned char)fi.dfLastChar - (unsigned char)fi.dfFirstChar) + 3, fp);
for(i = first_char; i < 0x100; i++) {
if(FT_Load_Char(face, cptable->sbcs.cp2uni[i], FT_LOAD_DEFAULT)) {
int c = get_char(cptable, enc, i);
if(FT_Load_Char(face, c, FT_LOAD_DEFAULT)) {
continue;
}
assert(dfCharTable[i].width == face->glyph->metrics.horiAdvance >> 6);