예제 #1
0
        public static void SetHintTechnique(this GlyphOutlineBuilderBase builder, HintTechnique hintTech)
        {
            builder.UseTrueTypeInstructions = false; //reset
            builder.UseVerticalHinting      = false; //reset
            switch (hintTech)
            {
            case HintTechnique.TrueTypeInstruction:
                builder.UseTrueTypeInstructions = true;
                break;

            case HintTechnique.TrueTypeInstruction_VerticalOnly:
                builder.UseTrueTypeInstructions = true;
                builder.UseVerticalHinting      = true;
                break;

            case HintTechnique.CustomAutoFit:
                //custom agg autofit
                builder.UseVerticalHinting = true;
                break;
            }
        }
예제 #2
0
 public static void Build(this GlyphOutlineBuilderBase builder, char c, float sizeInPoints)
 {
     builder.BuildFromGlyphIndex((ushort)builder.Typeface.GetGlyphIndex(c), sizeInPoints);
 }
 /// <summary>
 /// build and translate
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="glyphIndex"></param>
 /// <param name="sizeInPoints"></param>
 /// <param name="tx"></param>
 public static void BuildFromGlyphIndex(this GlyphOutlineBuilderBase builder, ushort glyphIndex, float sizeInPoints, IGlyphTranslator tx)
 {
     builder.BuildFromGlyphIndex(glyphIndex, sizeInPoints);
     builder.ReadShapes(tx);
 }