4b063c0e5b
Change-Id: Ia2302ee8acdf638bf001f0a2663e09688c21c505
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
--- a/src/lib/CDRParser.cpp
|
|
+++ b/src/lib/CDRParser.cpp
|
|
@@ -2415,7 +2415,8 @@ void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length)
|
|
}
|
|
unsigned numFonts = readU32(input);
|
|
CDR_DEBUG_MSG(("CDRParser::readStlt numFonts 0x%x\n", numFonts));
|
|
- std::map<unsigned,unsigned> fontIds;
|
|
+ std::map<unsigned,unsigned short> fontIds;
|
|
+ std::map<unsigned,unsigned short> fontEncodings;
|
|
std::map<unsigned,double> fontSizes;
|
|
for (i=0; i<numFonts; ++i)
|
|
{
|
|
@@ -2424,7 +2425,8 @@ void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length)
|
|
input->seek(12, WPX_SEEK_CUR);
|
|
else
|
|
input->seek(20, WPX_SEEK_CUR);
|
|
- fontIds[fontStyleId] = readU32(input);
|
|
+ fontIds[fontStyleId] = readU16(input);
|
|
+ fontEncodings[fontStyleId] = readU16(input);
|
|
input->seek(8, WPX_SEEK_CUR);
|
|
fontSizes[fontStyleId] = readCoordinate(input);
|
|
if (m_version < 1000)
|
|
@@ -2578,9 +2580,12 @@ void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length)
|
|
}
|
|
if (!fontRecordId)
|
|
continue;
|
|
- std::map<unsigned, unsigned>::const_iterator iterFontId = fontIds.find(fontRecordId);
|
|
+ std::map<unsigned, unsigned short>::const_iterator iterFontId = fontIds.find(fontRecordId);
|
|
if (iterFontId != fontIds.end())
|
|
tmpCharStyle.m_fontId = iterFontId->second;
|
|
+ std::map<unsigned, unsigned short>::const_iterator iterCharSet = fontEncodings.find(fontRecordId);
|
|
+ if (iterCharSet != fontEncodings.end())
|
|
+ tmpCharStyle.m_charSet = iterCharSet->second;
|
|
std::map<unsigned, double>::const_iterator iterFontSize = fontSizes.find(fontRecordId);
|
|
if (iterFontSize != fontSizes.end())
|
|
tmpCharStyle.m_fontSize = iterFontSize->second;
|