Lines Matching refs:rec

212 void CFX_CTTGSUBTable::ParseScriptList(FT_Bytes raw, struct TScriptList *rec)
216 rec->ScriptCount = GetUInt16(sp);
217 if(rec->ScriptCount <= 0) {
220 rec->ScriptRecord = new struct TScriptRecord[rec->ScriptCount];
221 for(i = 0; i < rec->ScriptCount; i++) {
222 rec->ScriptRecord[i].ScriptTag = GetUInt32(sp);
226 &rec->ScriptRecord[i].Script);
229 void CFX_CTTGSUBTable::ParseScript(FT_Bytes raw, struct TScript *rec)
233 rec->DefaultLangSys = GetUInt16(sp);
234 rec->LangSysCount = GetUInt16(sp);
235 if(rec->LangSysCount <= 0) {
238 rec->LangSysRecord = new struct TLangSysRecord[rec->LangSysCount];
239 for(i = 0; i < rec->LangSysCount; i++) {
240 rec->LangSysRecord[i].LangSysTag = GetUInt32(sp);
244 &rec->LangSysRecord[i].LangSys);
247 void CFX_CTTGSUBTable::ParseLangSys(FT_Bytes raw, struct TLangSys *rec)
250 rec->LookupOrder = GetUInt16(sp);
251 rec->ReqFeatureIndex = GetUInt16(sp);
252 rec->FeatureCount = GetUInt16(sp);
253 if(rec->FeatureCount <= 0) {
256 rec->FeatureIndex = new TT_uint16_t[rec->FeatureCount];
257 FXSYS_memset32(rec->FeatureIndex, 0, sizeof(TT_uint16_t) * rec->FeatureCount);
258 for (int i = 0; i < rec->FeatureCount; ++i) {
259 rec->FeatureIndex[i] = GetUInt16(sp);
262 void CFX_CTTGSUBTable::ParseFeatureList(FT_Bytes raw, TFeatureList *rec)
266 rec->FeatureCount = GetUInt16(sp);
267 if(rec->FeatureCount <= 0) {
270 rec->FeatureRecord = new struct TFeatureRecord[rec->FeatureCount];
271 for(i = 0; i < rec->FeatureCount; i++) {
272 rec->FeatureRecord[i].FeatureTag = GetUInt32(sp);
276 &rec->FeatureRecord[i].Feature);
279 void CFX_CTTGSUBTable::ParseFeature(FT_Bytes raw, TFeature *rec)
283 rec->FeatureParams = GetUInt16(sp);
284 rec->LookupCount = GetUInt16(sp);
285 if(rec->LookupCount <= 0) {
288 rec->LookupListIndex = new TT_uint16_t[rec->LookupCount];
289 for(i = 0; i < rec->LookupCount; i++) {
290 rec->LookupListIndex[i] = GetUInt16(sp);
293 void CFX_CTTGSUBTable::ParseLookupList(FT_Bytes raw, TLookupList *rec)
297 rec->LookupCount = GetUInt16(sp);
298 if(rec->LookupCount <= 0) {
301 rec->Lookup = new struct TLookup[rec->LookupCount];
302 for(i = 0; i < rec->LookupCount; i++) {
306 &rec->Lookup[i]);
309 void CFX_CTTGSUBTable::ParseLookup(FT_Bytes raw, TLookup *rec)
313 rec->LookupType = GetUInt16(sp);
314 rec->LookupFlag = GetUInt16(sp);
315 rec->SubTableCount = GetUInt16(sp);
316 if(rec->SubTableCount <= 0) {
319 rec->SubTable = new struct TSubTableBase*[rec->SubTableCount];
320 for(i = 0; i < rec->SubTableCount; i++) {
321 rec->SubTable[i] = NULL;
323 if(rec->LookupType != 1) {
326 for(i = 0; i < rec->SubTableCount; i++) {
330 &rec->SubTable[i]);
333 void CFX_CTTGSUBTable::ParseCoverage(FT_Bytes raw, TCoverageFormatBase **rec)
339 *rec = new TCoverageFormat1();
340 ParseCoverageFormat1(raw, (TCoverageFormat1*)*rec);
343 *rec = new TCoverageFormat2();
344 ParseCoverageFormat2(raw, (TCoverageFormat2*)*rec);
348 void CFX_CTTGSUBTable::ParseCoverageFormat1(FT_Bytes raw, TCoverageFormat1 *rec)
353 rec->GlyphCount = GetUInt16(sp);
354 if(rec->GlyphCount <= 0) {
357 rec->GlyphArray = new TT_uint16_t[rec->GlyphCount];
358 for(i = 0; i < rec->GlyphCount; i++) {
359 rec->GlyphArray[i] = GetUInt16(sp);
362 void CFX_CTTGSUBTable::ParseCoverageFormat2(FT_Bytes raw, TCoverageFormat2 *rec)
367 rec->RangeCount = GetUInt16(sp);
368 if(rec->RangeCount <= 0) {
371 rec->RangeRecord = new TRangeRecord[rec->RangeCount];
372 for(i = 0; i < rec->RangeCount; i++) {
373 rec->RangeRecord[i].Start = GetUInt16(sp);
374 rec->RangeRecord[i].End = GetUInt16(sp);
375 rec->RangeRecord[i].StartCoverageIndex = GetUInt16(sp);
378 void CFX_CTTGSUBTable::ParseSingleSubst(FT_Bytes raw, TSubTableBase **rec)
384 *rec = new TSingleSubstFormat1();
385 ParseSingleSubstFormat1(raw, (TSingleSubstFormat1*)*rec);
388 *rec = new TSingleSubstFormat2();
389 ParseSingleSubstFormat2(raw, (TSingleSubstFormat2*)*rec);
393 void CFX_CTTGSUBTable::ParseSingleSubstFormat1(FT_Bytes raw, TSingleSubstFormat1 *rec)
400 &rec->Coverage);
401 rec->DeltaGlyphID = GetInt16(sp);
403 void CFX_CTTGSUBTable::ParseSingleSubstFormat2(FT_Bytes raw, TSingleSubstFormat2 *rec)
411 &rec->Coverage);
412 rec->GlyphCount = GetUInt16(sp);
413 if(rec->GlyphCount <= 0) {
416 rec->Substitute = new TT_uint16_t[rec->GlyphCount];
417 for(i = 0; i < rec->GlyphCount; i++) {
418 rec->Substitute[i] = GetUInt16(sp);