public TPdfUnicodeTrueTypeFont(Font aFont, int aId, TFontSubset aSubset, bool aCompress, bool aUseKerning, TPdfEmbeddedFont aEmbeddedData, FontStyle aAdditionalStyle, TPdfResources aResources) : base(aFont, aId, aCompress, aUseKerning, aEmbeddedData, aAdditionalStyle, aResources) { UsedChars = new TUsedCharList(); ToUnicodeData = new TToUnicode(); Subset = aSubset == TFontSubset.Subset; }
protected TPdfBaseTrueTypeFont(Font aFont, int aId, bool aCompress, bool aUseKerning, TPdfEmbeddedFont aEmbeddedData, FontStyle aAdditionalStyle, TPdfResources aResources) : base(aFont, aId, aUseKerning, aResources) { FCompress = aCompress; EmbeddedData = aEmbeddedData; FTrueTypeData = aEmbeddedData.TrueTypeData; AdditionalStyle = aAdditionalStyle; }
public TPdfWinAnsiTrueTypeFont(Font aFont, int aId, bool aEmbed, TFontSubset aSubset, bool aCompress, bool aUseKerning, TPdfEmbeddedFont aEmbeddedData, FontStyle aAdditionalStyle, TPdfResources aResources) : base(aFont, aId, aCompress, aUseKerning, aEmbeddedData, aAdditionalStyle, aResources) { Embed = aEmbed; Subset = aSubset == TFontSubset.Subset; FirstChar = -1; LastChar = 0; }
internal static TPdfFont CreateInstance(TFontMapping Mapping, Font aFont, bool aUnicode, int aId, TFontEmbed aEmbed, TFontSubset aSubset, bool aCompress, bool aUseKerning, TFontEvents FontEvents, TPdfEmbeddedFontList EmbeddedFontList, TPdfResources aResources) { if (!aUnicode && (Mapping == TFontMapping.ReplaceAllFonts || (Mapping == TFontMapping.ReplaceStandardFonts && IsStandardFont(aFont.Name))) ) { return(new TPdfInternalFont(aFont, aId, aUseKerning, aResources)); } FontStyle AdditionalStyle; TPdfEmbeddedFont EmbeddedData = EmbeddedFontList.Add(aFont, FontEvents, aSubset == TFontSubset.Subset, aUseKerning, out AdditionalStyle); if (AdditionalStyle != FontStyle.Regular) { if (FlexCelTrace.HasListeners) { FlexCelTrace.Write(new TPdfFauxBoldOrItalicsError(FlxMessages.GetString(FlxErr.ErrFauxBoldOrItalic, aFont.Name, GetAdditionalStyleName(AdditionalStyle)), aFont.Name, AdditionalStyle)); } } if (aUnicode) { return(new TPdfUnicodeTrueTypeFont(aFont, aId, aSubset, aCompress, aUseKerning, EmbeddedData, AdditionalStyle, aResources)); } else { bool DoEmbed = aEmbed == TFontEmbed.Embed || EmbeddedData.TrueTypeData.NeedsEmbed(aEmbed); if (FontEvents.OnFontEmbed != null) { FontEmbedEventArgs ae = new FontEmbedEventArgs(aFont, DoEmbed); FontEvents.OnFontEmbed(FontEvents.Sender, ae); DoEmbed = ae.Embed; } return(new TPdfWinAnsiTrueTypeFont(aFont, aId, DoEmbed, aSubset, aCompress, aUseKerning, EmbeddedData, AdditionalStyle, aResources)); } }