Пример #1
0
 public override void Flush()
 {
     base.Flush();
     if (character != null)
     {
         character.Flush();
         character = null;
     }
     ObjPool <RotatedCharBox> .Release(this);
 }
Пример #2
0
        public static UnicodeBox Get(TexCharMetric metric, int fontIdx, CharacterInfo c)
        {
            var box = ObjPool <UnicodeBox> .Get();

            // float ratio = TEXPreference.main.fontData[fontIdx].Font_Asset.fontSize / Scale;
            box.character    = c;
            box.fontIndex    = fontIdx;
            box.depth        = metric.depth;
            box.height       = metric.height;
            box.bearing      = metric.bearing;
            box.italic       = metric.italic;
            box.width        = metric.width;
            box.scaleApplied = metric.appliedScale;
            // We are not keeping this ...
            metric.Flush();
            return(box);
        }