Ejemplo n.º 1
0
        public bool Read()
        {
            if (_index >= _end)
            {
                return(false);
            }

            //read current
            UnscaledGlyphPlan unscale = _seq[_index];

            float scaled_advW = unscale.AdvanceX * _pxscale;

            _exactX            = _accW + (unscale.AdvanceX + unscale.OffsetX) * _pxscale;
            _exactY            = unscale.OffsetY * _pxscale;
            _accW             += scaled_advW;
            _currentGlyphIndex = unscale.glyphIndex;
            _index++;
            return(true);
        }
Ejemplo n.º 2
0
        //
        public bool Read()
        {
            if (_index >= _end)
            {
                return(false);
            }

            //read current
            UnscaledGlyphPlan unscale = _seq[_index];

            short scaled_advW    = (short)Math.Round(unscale.AdvanceX * _pxscale);
            short scaled_offsetX = (short)Math.Round(unscale.OffsetX * _pxscale);
            short scaled_offsetY = (short)Math.Round(unscale.OffsetY * _pxscale);

            _exactX = _accW + scaled_offsetX;
            _exactY = scaled_offsetY;
            _accW  += scaled_advW;

            _currentGlyphIndex = unscale.glyphIndex;
            _index++;
            return(true);
        }
Ejemplo n.º 3
0
 public void Append(UnscaledGlyphPlan glyphPlan)
 {
     _list.Add(glyphPlan);
     _accumAdvanceX += glyphPlan.AdvanceX;
 }