mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-25 17:00:58 +00:00
Use freetype's LCD subpixel code instead of scaling manually if the freetype used is sufficiently new.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@18192 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
481db20b01
commit
938204efd6
2 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-11-25 12:09 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Source/art/ftfont.m ([FTFontInfo_subpixel
|
||||||
|
-drawGlyphs::at::to::::::color::::transform:drawinfo:): If freetype
|
||||||
|
is sufficiently new, use its LCD subpixel support instead of scaling
|
||||||
|
manually.
|
||||||
|
|
||||||
2003-11-23 Adam Fedor <fedor@gnu.org>
|
2003-11-23 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Version 0.9.1
|
* Version 0.9.1
|
||||||
|
|
|
@ -2441,7 +2441,7 @@ static int filters[3][7]=
|
||||||
#ifdef FT212_STUFF
|
#ifdef FT212_STUFF
|
||||||
cur.type = ftc_image_grays, subpixel = YES, cur.font.pix_width *= 3, x *= 3;
|
cur.type = ftc_image_grays, subpixel = YES, cur.font.pix_width *= 3, x *= 3;
|
||||||
#else
|
#else
|
||||||
cur.flags = FT_LOAD_TARGET_NORMAL, subpixel = YES, cur.font.pix_width *= 3, x *= 3;
|
cur.flags = FT_LOAD_TARGET_LCD, subpixel = YES;
|
||||||
#endif
|
#endif
|
||||||
// imgd.type|=|ftc_image_flag_unhinted; /* TODO? when? */
|
// imgd.type|=|ftc_image_flag_unhinted; /* TODO? when? */
|
||||||
}
|
}
|
||||||
|
@ -2490,9 +2490,17 @@ static int filters[3][7]=
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FT212_STUFF
|
||||||
if (sbit->format == ft_pixel_mode_grays)
|
if (sbit->format == ft_pixel_mode_grays)
|
||||||
|
#else
|
||||||
|
if (sbit->format == FT_PIXEL_MODE_LCD)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifdef FT212_STUFF
|
||||||
int gx = x + sbit->left, gy = y - sbit->top;
|
int gx = x + sbit->left, gy = y - sbit->top;
|
||||||
|
#else
|
||||||
|
int gx = 3 * x + sbit->left, gy = y - sbit->top;
|
||||||
|
#endif
|
||||||
int px0 = (gx - 2 < 0? gx - 4 : gx - 2) / 3;
|
int px0 = (gx - 2 < 0? gx - 4 : gx - 2) / 3;
|
||||||
int px1 = (gx + sbit->width + 2 < 0? gx + sbit->width + 2: gx + sbit->width + 4) / 3;
|
int px1 = (gx + sbit->width + 2 < 0? gx + sbit->width + 2: gx + sbit->width + 4) / 3;
|
||||||
int llip = gx - px0 * 3;
|
int llip = gx - px0 * 3;
|
||||||
|
|
Loading…
Reference in a new issue