Esempio n. 1
0
        internal int addGlyph(FreeType.iFont font)
        {
            int res = font.buildBitmap(atlas);

            Utils.NativeErrorMessages.throwForHR(res);
            needsUpdate = true;
            return(res);
        }
Esempio n. 2
0
        iFont iFontFace.createFont(float fontSizePt, float dpiScaling)
        {
            uint sizePixels = Utils.computeFontSize(fontSizePt, dpiScaling);

            if (cache.TryGetValue(sizePixels, out var font))
            {
                return(font);
            }

            font = new Font(drawDevice.fontTextures, this, sizePixels);
            cache.Add(sizePixels, font);
            return(font);
        }
Esempio n. 3
0
 public FontFace(DrawDevice drawDevice, iFreeType factory, System.IO.Stream stream, string name = null, int faceIndex = 0)
 {
     this.drawDevice = drawDevice;
     font            = factory.createFont(stream, name, faceIndex);
     font.getInfo(out info);
 }