Ejemplo n.º 1
0
        public TTFTextTexturePortion GetGlyphBitmap(object parameters, object font, char c)
        {
            Parameters p = (parameters) as Parameters;

            if (p.useFontSheets)
            {
                TTFTextInternal.TextureMapManager fontsheet =
                    TTFTextInternal.TextureMapManager.GetTextureMapManager(
                        this.GetType().Name,
                        ((string)font),
                        (cc) => (this.ComputeGlyphBitmap(parameters, font, cc))
                        );

                //fontsheet.EnablePackedMaterial(p.shader);
                if (fontsheet.IsRequestedInMap(c))
                {
                    return(fontsheet.GetChar(c));
                }
                else
                {
                    return(ComputeGlyphBitmap(parameters, font, c));
                }
            }
            else
            {
                return(ComputeGlyphBitmap(parameters, font, c));
            }
        }
Ejemplo n.º 2
0
        public TTFTextTexturePortion GetGlyphBitmap(object parameters, object font, char c)
        {
#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR
            TTFTextInternal.TextureMapManager fontsheet =
                TTFTextInternal.TextureMapManager.GetTextureMapManager(
                    this.GetType().Name,
                    ((Font)font).font.FamilyName,
                    (cc) => (this.ComputeGlyphBitmapTex(parameters, font, cc)));
            Parameters p = (parameters) as Parameters;
            fontsheet.EnablePackedMaterial(p.shader);


            if (fontsheet.IsRequestedInMap(c))
            {
                return(fontsheet.GetChar(c));
            }
            else
            {
                return(ComputeGlyphBitmap(parameters, font, c));
            }
#else
            return(null);
#endif
        }