public SvgFont(SvgFontFace fontface, int emSizeInPoints) { this.fontface = fontface; this.emSizeInPoints = emSizeInPoints; //------------------------------------ emSizeInPixels = (int)(((float)emSizeInPoints / (float)POINTS_PER_INCH) * (float)PIXEL_PER_INCH); currentEmScalling = (float)emSizeInPixels / (float)fontface.UnitsPerEm; scaleTx = Affine.NewMatix(AffinePlan.Scale(currentEmScalling)); }
internal static void SetShapingEngine(SvgFontFace fontFace, string lang, HBDirection hb_direction, int hb_scriptcode) { ////string lang = "en"; ////PixelFarm.Font2.NativeMyFontsLib.MyFtSetupShapingEngine(ftFaceHandle, //// lang, //// lang.Length, //// HBDirection.HB_DIRECTION_LTR, //// HBScriptCode.HB_SCRIPT_LATIN); //ExportTypeFaceInfo exportTypeInfo = new ExportTypeFaceInfo(); //NativeMyFontsLib.MyFtSetupShapingEngine(fontFace.Handle, // lang, // lang.Length, // hb_direction, // hb_scriptcode, // ref exportTypeInfo); //fontFace.HBFont = exportTypeInfo.hb_font; }