Esempio n. 1
0
        public void UpdateGlyphLayoutSettings()
        {
            if (this._reqFont == null)
            {
                //this.ScriptLang = canvasPainter.CurrentFont.GetOpenFontScriptLang();
                ChangeFont(canvasPainter.CurrentFont);
            }

            //2.1
            _glyphMeshStore.SetHintTechnique(this.HintTechnique);
            //2.2
            _glyphLayout.Typeface          = this.Typeface;
            _glyphLayout.ScriptLang        = this.ScriptLang;
            _glyphLayout.PositionTechnique = this.PositionTechnique;
            _glyphLayout.EnableLigature    = this.EnableLigature;

            _currentFontSizePxScale = Typeface.CalculateScaleToPixelFromPointSize(FontSizeInPoints);

            //2.3
            if (_pxScaleEngine != null)
            {
                _pxScaleEngine.SetFont(this.Typeface, this.FontSizeInPoints);
            }
            //3. layout glyphs with selected layout technique
            //TODO: review this again, we should use pixel?



            //3.
            //color...
        }
Esempio n. 2
0
        public void UpdateGlyphLayoutSettings()
        {
            if (_reqFont == null)
            {
                //this.ScriptLang = canvasPainter.CurrentFont.GetOpenFontScriptLang();
                ChangeFont(_painter.CurrentFont);
            }
            //2.1
            if (Typeface == null)
            {
                return;
            }
            _glyphMeshStore.SetHintTechnique(this.HintTechnique);
            _currentFontSizePxScale = Typeface.CalculateScaleToPixelFromPointSize(FontSizeInPoints);

            ////2.3
            //if (_pxScaleEngine != null)
            //{
            //    _pxScaleEngine.SetFont(this.Typeface, this.FontSizeInPoints);
            //}
        }
        void UpdateGlyphLayoutSettings()
        {
            if (this._reqFont == null)
            {
                //this.ScriptLang = canvasPainter.CurrentFont.GetOpenFontScriptLang();
                ChangeFont(canvasPainter.CurrentFont);
            }

            //2.1
            _glyphMeshStore.SetHintTechnique(this.HintTechnique);
            //2.2
            _glyphLayout.Typeface          = this.Typeface;
            _glyphLayout.ScriptLang        = this.ScriptLang;
            _glyphLayout.PositionTechnique = this.PositionTechnique;
            _glyphLayout.EnableLigature    = this.EnableLigature;
            //3.
            //color...
        }