Bring back simple grayscale rendering option
This commit is contained in:
@@ -18,9 +18,9 @@ struct FR_Impl;
|
||||
typedef struct FR_Impl FontRenderer;
|
||||
|
||||
enum {
|
||||
FONT_RENDERER_HINTING = 1 << 0,
|
||||
FONT_RENDERER_KERNING = 1 << 1,
|
||||
FONT_RENDERER_SUBPIXEL = 1 << 2,
|
||||
FR_HINTING = 1 << 0,
|
||||
FR_KERNING = 1 << 2,
|
||||
FR_SUBPIXEL = 1 << 3,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -32,35 +32,19 @@ typedef struct {
|
||||
} FR_Clip_Area;
|
||||
|
||||
FontRenderer * FR_New(unsigned int flags, float gamma);
|
||||
|
||||
void FR_Free(FontRenderer *);
|
||||
|
||||
FR_Bitmap* FR_Bitmap_New(FontRenderer *, int width, int height);
|
||||
int FR_Load_Font(FontRenderer *, const char *filename);
|
||||
|
||||
int FR_Get_Font_Height(FontRenderer *, float size);
|
||||
|
||||
int FR_Bake_Font_Bitmap(FontRenderer *, int font_height,
|
||||
FR_Bitmap *image,
|
||||
int first_char, int num_chars, FR_Bitmap_Glyph_Metrics *glyph_info,
|
||||
int subpixel_scale);
|
||||
|
||||
#if 0
|
||||
// FIXME: this function needs to be updated to match BlendGammaSubpixel.
|
||||
void FR_Blend_Gamma(FontRenderer *,
|
||||
uint8_t *dst, int dst_stride,
|
||||
uint8_t *src, int src_stride,
|
||||
int region_width, int region_height,
|
||||
FR_Color color);
|
||||
#endif
|
||||
|
||||
void FR_Blend_Gamma_Subpixel(FontRenderer *font_renderer,
|
||||
int first_char, int num_chars, FR_Bitmap_Glyph_Metrics *glyph_info);
|
||||
void FR_Blend_Glyph(FontRenderer *font_renderer,
|
||||
FR_Clip_Area *clip, int x, int y,
|
||||
uint8_t *dst, int dst_width,
|
||||
const FR_Bitmap *glyphs_bitmap,
|
||||
const FR_Bitmap_Glyph_Metrics *glyph, FR_Color color);
|
||||
|
||||
FR_Bitmap* FR_Bitmap_New(int width, int height, int subpixel_scale);
|
||||
|
||||
void FR_Bitmap_Free(FR_Bitmap *image);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user