Add option to disable X axis font's pre-scaling
If used pre-scaling along X null the effect of the font's hinting.
This commit is contained in:
@@ -20,8 +20,8 @@ public:
|
||||
// Conventional LUT values: (1./3., 2./9., 1./9.)
|
||||
// The values below are fine tuned as in the Elementary Plot library.
|
||||
|
||||
FR_Impl(bool hinting, bool kerning, bool subpixel, float gamma_value) :
|
||||
m_renderer(hinting, kerning, subpixel),
|
||||
FR_Impl(bool hinting, bool kerning, bool subpixel, bool prescale_x, float gamma_value) :
|
||||
m_renderer(hinting, kerning, subpixel, prescale_x),
|
||||
m_gamma_lut(double(gamma_value)),
|
||||
m_lcd_lut(0.448, 0.184, 0.092),
|
||||
m_subpixel(subpixel)
|
||||
@@ -40,10 +40,11 @@ private:
|
||||
};
|
||||
|
||||
FR_Renderer *FR_Renderer_New(unsigned int flags, float gamma) {
|
||||
bool hinting = ((flags & FR_HINTING) != 0);
|
||||
bool kerning = ((flags & FR_KERNING) != 0);
|
||||
bool subpixel = ((flags & FR_SUBPIXEL) != 0);
|
||||
return new FR_Impl(hinting, kerning, subpixel, gamma);
|
||||
bool hinting = ((flags & FR_HINTING) != 0);
|
||||
bool kerning = ((flags & FR_KERNING) != 0);
|
||||
bool subpixel = ((flags & FR_SUBPIXEL) != 0);
|
||||
bool prescale_x = ((flags & FR_PRESCALE_X) != 0);
|
||||
return new FR_Impl(hinting, kerning, subpixel, prescale_x, gamma);
|
||||
}
|
||||
|
||||
FR_Bitmap* FR_Bitmap_New(FR_Renderer *font_renderer, int width, int height) {
|
||||
|
||||
Reference in New Issue
Block a user