private TrueTypeFontTable ReadPostscriptTable(uint length, TrueTypeTableEntryList list, BigEndianReader reader) { PostscriptTable post = new PostscriptTable(reader.Position); post.TableVersion = reader.ReadFixedVersion(); post.ItalicAngle = reader.ReadFixed1616(); post.UnderlinePosition = reader.ReadInt16(); post.UnderlineThickness = reader.ReadInt16(); post.FixedPitch = reader.ReadUInt32(); post.MinMemoryOpenType = reader.ReadUInt32(); post.MaxMemoryOpenType = reader.ReadUInt32(); post.MinMemoryType1 = reader.ReadUInt32(); post.MaxMemoryType1 = reader.ReadUInt32(); //TODO: Read the names if correct version. if (post.TableVersion == new Version(2, 0)) { List <GlyphName> glyphnammes = new List <GlyphName>(); Dictionary <int, GlyphName> offsets = new Dictionary <int, GlyphName>(); ushort count = reader.ReadUInt16(); for (int i = 0; i < count; i++) { GlyphName gname = new GlyphName(); gname.Index = reader.ReadUInt16(); if (gname.Index > 257) { offsets.Add(gname.Index - 258, gname); } glyphnammes.Add(gname); } post.Names = glyphnammes; if (offsets.Count > 0) { count = (ushort)offsets.Count; for (int i = 0; i < count; i++) { string s = reader.ReadPascalString(); GlyphName g; if (offsets.TryGetValue(i, out g)) { g.Name = s; } } } } else if (post.TableVersion == new Version(2, 5)) { } return(post); }