void Start()
        {
            text = GetComponent <Text>();
            FontEngine.InitializeFontEngine();

            FontEngine.LoadFontFace(text.font, text.font.fontSize);
            faceInfo = FontEngine.GetFaceInfo();

            FontEngine.DestroyFontEngine();
        }
Beispiel #2
0
    void Start()
    {
        block = new MaterialPropertyBlock();

        // glyphLookUp = FontAsset.glyphLookupTable;
        // block.SetColor(ShaderIDConstants.Color, Color.green);

        // Material = Canvas.GetDefaultCanvasMaterial();
        mesh = new Mesh();

        vertexInfo = new List <VertexData>();
        indices    = new List <uint>();

        FontEngine.InitializeFontEngine();

        FontEngine.LoadFontFace(FontToUse, 90);
        faceInfo = FontEngine.GetFaceInfo();

        // FontToUse.RequestCharactersInTexture(Text, 0, FontStyle.Italic | FontStyle.Normal | FontStyle.Bold | FontStyle.BoldAndItalic);
        FontToUse.RequestCharactersInTexture(Text);

        FontEngine.DestroyFontEngine();
    }