void insertEntity_Identifier(Glyph entity, bool bItalic, bool bBold) { this.insertEntity_Identifier(entity.Name, bItalic, bBold); }
public void InsertEntityOperator (Glyph entity) { if (!this.StretchyBrackets && this.IsStretchy (entity)) { this.insertMathML ( "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo stretchy=\"false\" nugenCursorEnd=''>&" + entity.Name + ";</mo></math>"); } else { this.insertMathML ( "<math xmlns='http://www.w3.org/1998/Math/MathML'><mo nugenCursorEnd=''>&" + entity.Name + ";</mo></math>"); } }
// private bool IsStretchy (Glyph entity) { return this.IsStretchy (entity.Code); }
public EntityManager(FontCollection FontCollection) { this.fonts_ = null; this.fonts_ = FontCollection; this.mapper_ = new Entity2FontMapper(this.fonts_, true); this.list_ = new ArrayList(5); this.fontFamilyInfos_ = new Hashtable(5, 0.5f); for (int i = 0; i < this.mapper_.FontTable_Count; i++) { FontFamilyInfo fontFamilyInfo = new FontFamilyInfo(); FontTable fontTable = this.mapper_.GetFontTable(i); fontFamilyInfo.FontFamily = fontTable.FontFamily; fontFamilyInfo.Name = fontTable.Name; fontFamilyInfo.CorrectB = fontTable.CorrectB; fontFamilyInfo.CorrectH = fontTable.CorrectH; fontFamilyInfo.CorrectW = fontTable.CorrectW; fontFamilyInfo.CorrectY = fontTable.CorrectY; fontFamilyInfo.CorrectX = fontTable.CorrectX; this.list_.Add(fontFamilyInfo); this.fontFamilyInfos_.Add(fontFamilyInfo.FontFamily, fontFamilyInfo); } this.mapper_.ClearFontTables(); this.ids_ = new MapItems(); this.ops_ = new MapItems(); try { for (int i = 0; i < this.mapper_.uniCats_.Count; i++) { bool isActive = false; UnicodeCategory unicodeCategory = this.mapper_.uniCats_.Indexer(i); isActive = false; switch (unicodeCategory.ID) { case 1: case 3: case 4: case 7: case 9: case 11: case 12: case 14: case 0x16: case 0x1d: case 0x1f: case 0x20: isActive = true; break; } this.ids_.Put(unicodeCategory.ID, unicodeCategory.Name, isActive); isActive = false; switch (unicodeCategory.ID) { case 1: case 11: case 12: case 0x10: case 0x11: case 0x12: case 0x18: case 0x19: case 0x1d: case 0x20: isActive = true; break; } this.ops_.Put(unicodeCategory.ID, unicodeCategory.Name, isActive); } for (int g = 0; g < this.Count; g++) { Glyph glyph = this.Get(g); if ((glyph != null) && glyph.IsVisible) { this.ops_.Ref(glyph.Category.ID, true); this.ids_.Ref(glyph.Category.ID, true); if (glyph.FontFamily.Length > 0) { this.ops_.Ref(glyph.Category.ID, false); this.ids_.Ref(glyph.Category.ID, false); } } } } catch { } }
public Glyph ByUnicode(string unicode) { Glyph glyph = null; EntityInfo entityInfo = null; try { entityInfo = this.mapper_.ItemFromHex(unicode.PadLeft(5, '0')); if (entityInfo != null) { glyph = new Glyph(entityInfo); } } catch { } return glyph; }
public Glyph Get(int index) { Glyph glyph = null; EntityInfo entityInfo = null; try { entityInfo = this.mapper_.Get(index); if (entityInfo != null) { glyph = new Glyph(entityInfo); } } catch { } return glyph; }
public Glyph ByName(string name) { Glyph glyph = null; EntityInfo entityInfo = null; try { entityInfo = this.mapper_.ItemForEntity(name); if (entityInfo != null) { glyph = new Glyph(entityInfo); } } catch { } return glyph; }