コード例 #1
0
ファイル: GlyphLayout.cs プロジェクト: luislasonbra/PixelFarm
        void UpdateLayoutPlan()
        {
            GlyphLayoutPlanContext context = _layoutPlanCollection.GetPlanOrCreate(this._typeface, this._scriptLang);

            this._gpos      = context._glyphPos;
            this._gsub      = context._glyphSub;
            _needPlanUpdate = false;
        }
コード例 #2
0
        public static void CollectAllAssociateGlyphIndex(this Typeface typeface, List <ushort> outputGlyphIndexList, ScriptLang scLang, UnicodeLangBits[] selectedRangs = null)
        {
            //-----------
            //general glyph index in the unicode range

            //if user dose not specific the unicode lanf bit ranges
            //the we try to select it ourself.
            UnicodeLangBits[] unicodeLangBitsRanges;
            if (ScriptLangs.TryGenUnicodeLangBitsArray(scLang.shortname, out unicodeLangBitsRanges))
            {
                //one lang may contains may ranges
                if (selectedRangs != null)
                {
                    //select only in range
                    unicodeLangBitsRanges = FilterOnlySelectedRange(unicodeLangBitsRanges, selectedRangs);
                }

                foreach (UnicodeLangBits unicodeLangBits in unicodeLangBitsRanges)
                {
                    UnicodeRangeInfo rngInfo = unicodeLangBits.ToUnicodeRangeInfo();
                    int endAt = rngInfo.EndAt;
                    for (int codePoint = rngInfo.StartAt; codePoint <= endAt; ++codePoint)
                    {
                        ushort glyghIndex = typeface.LookupIndex(codePoint);
                        if (glyghIndex > 0)
                        {
                            //add this glyph index
                            outputGlyphIndexList.Add(glyghIndex);
                        }
                    }
                }
            }

            //-----------
            if (typeface.GSUBTable != null)
            {
                var gsub = new GlyphSubstitution(typeface, scLang.shortname);
                gsub.CollectAdditionalSubstitutionGlyphIndices(outputGlyphIndexList);
            }
        }
コード例 #3
0
ファイル: GlyphLayout.cs プロジェクト: luislasonbra/PixelFarm
 public GlyphLayoutPlanContext(GlyphSubstitution _glyphSub, GlyphSetPosition glyphPos)
 {
     this._glyphSub = _glyphSub;
     this._glyphPos = glyphPos;
 }
コード例 #4
0
 public GlyphLayoutPlanContext(GlyphSubstitution glyphSub, GlyphSetPosition glyphPos)
 {
     _glyphSub = glyphSub;
     _glyphPos = glyphPos;
 }