Esempio n. 1
0
        public override void LoadNow()
        {
            // Clear:
            FirstPathNode  = null;
            LatestPathNode = null;
            PathNodeCount  = 0;

            Glyph[] glyphs = Font.ParserGlyphs;

            VectorTransform current = FirstComponent;

            while (current != null)
            {
                Glyph componentGlyph = glyphs[current.Index];

                if (componentGlyph != null)
                {
                    if (componentGlyph.RequiresLoad)
                    {
                        // Load it:
                        componentGlyph.LoadNow();
                    }
                }

                if (componentGlyph.WasHoleSorted)
                {
                    // Sort all of them.
                    HoleSorted = true;
                }

                current = current.Next;
            }

            // Load fully:
            LoadFully(glyphs);

            // Reduce the amount of unloaded glyphs:
            Font.UnloadedGlyphs--;

            if (Font.UnloadedGlyphs <= 0)
            {
                // Let the font know that every glyph is now loaded:
                Font.AllGlyphsLoaded();
            }
        }