We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reported in version: 2.0.10 Reported for operating system, platform: All, All
On 2010-03-21 04:41:17 +0000, Tobias Leich wrote:
Hi, if I do: TTF_SetFontHinting(font, TTF_HINTING_LIGHT); // TTF_HINTING_LIGHT == 1 then: TTF_GetFontHinting(font): returns 65536 instead of TTF_HINTING_LIGHT (1). You do a translation is the Set~ function: void TTF_SetFontHinting( TTF_Font* font, int hinting ) { if (hinting == TTF_HINTING_LIGHT) font->hinting = FT_LOAD_TARGET_LIGHT; else if (hinting == TTF_HINTING_MONO) font->hinting = FT_LOAD_TARGET_MONO; else if (hinting == TTF_HINTING_NONE) font->hinting = FT_LOAD_NO_HINTING; else font->hinting = 0; Flush_Cache( font ); } But none in the Get~ function: int TTF_GetFontHinting( const TTF_Font* font ) { return font->hinting; } The FT_~ constants are not 0..3 like the TTF_~ are (freetype/freetype.h): #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) #define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) #define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) #define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) #define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) #define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) Cheers
Hi, if I do:
TTF_SetFontHinting(font, TTF_HINTING_LIGHT); // TTF_HINTING_LIGHT == 1
then:
TTF_GetFontHinting(font):
returns 65536 instead of TTF_HINTING_LIGHT (1).
You do a translation is the Set~ function:
void TTF_SetFontHinting( TTF_Font* font, int hinting ) { if (hinting == TTF_HINTING_LIGHT) font->hinting = FT_LOAD_TARGET_LIGHT; else if (hinting == TTF_HINTING_MONO) font->hinting = FT_LOAD_TARGET_MONO; else if (hinting == TTF_HINTING_NONE) font->hinting = FT_LOAD_NO_HINTING; else font->hinting = 0; Flush_Cache( font ); }
But none in the Get~ function:
int TTF_GetFontHinting( const TTF_Font* font ) { return font->hinting; }
The FT_~ constants are not 0..3 like the TTF_~ are (freetype/freetype.h):
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) #define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) #define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) #define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) #define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
Cheers
On 2010-03-25 02:03:14 +0000, Sam Lantinga wrote:
This is fixed in source control, thanks! http://hg.libsdl.org/SDL_ttf/rev/346309f53e45 http://hg.libsdl.org/SDL_ttf/rev/25ec85256dca
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This bug report was migrated from our old Bugzilla tracker.
Reported in version: 2.0.10
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2010-03-21 04:41:17 +0000, Tobias Leich wrote:
On 2010-03-25 02:03:14 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: