Example #1
0
 private unsafe static MipGeneratorFn PickMipGenerator(FreeTypeFont font)
 {
     // TODO: Add a property that controls whether srgb is used. Or is freetype always srgb?
     return(font.sRGB
            // FIXME: Use a sRGB gamma ramp for this?
         ? MipGenerator.Get(MipFormat.pGray4 | MipFormat.sRGB)
         : font.MipGen?.Get(MipFormat.pGray4) ?? MipGenerator.Get(MipFormat.pGray4));
 }
Example #2
0
 public FontSize(FreeTypeFont font, float sizePoints)
 {
     Font       = font;
     SizePoints = sizePoints;
     Font.Sizes.Add(this);
 }
Example #3
0
 private unsafe static MipGenerator <Color> PickMipGenerator(FreeTypeFont font)
 {
     // TODO: Add a property that controls whether srgb is used. Or is freetype always srgb?
     return(MipGenerator.sRGBPAGray);
 }