Index: core/src/fxge/ge/fx_ge_fontmap.cpp |
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp |
index 22c399150d6d3a2ac629937938a144e5928eb610..28770301b94279fc6995b1edb90fe5b11df0eb9d 100644 |
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp |
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp |
@@ -748,19 +748,6 @@ FX_DWORD _GetCodePageRangeFromCharset(int charset) |
} |
return 1 << 21; |
} |
-static int CP2CharSet(int cp) |
-{ |
- if(cp == 932) { |
- return FXFONT_SHIFTJIS_CHARSET; |
- } else if(cp == 936) { |
- return FXFONT_GB2312_CHARSET; |
- } else if(cp == 949) { |
- return FXFONT_HANGEUL_CHARSET; |
- } else if(cp == 950) { |
- return FXFONT_CHINESEBIG5_CHARSET; |
- } |
- return FXFONT_DEFAULT_CHARSET; |
-} |
FXFT_Face CFX_FontMapper::UseInternalSubst(CFX_SubstFont* pSubstFont, int iBaseFont, int italic_angle, int weight, int picthfamily) |
{ |
if (iBaseFont < 12) { |
@@ -1389,6 +1376,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path) |
FX_BYTE buffer[16]; |
FXSYS_fseek(pFile, 0, FXSYS_SEEK_SET); |
size_t readCnt = FXSYS_fread(buffer, 12, 1, pFile); |
jun_fang
2015/01/17 00:39:17
suggest to check whether readCnt equals to 12.
|
+ // TODO(tsepez): File bug, reading from a file less than 12 bytes gives UMR. |
if (GET_TT_LONG(buffer) == 0x74746366) { |
FX_DWORD nFaces = GET_TT_LONG(buffer + 8); |
FX_LPBYTE offsets = FX_Alloc(FX_BYTE, nFaces * 4); |