Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41639 Signed-off-by: Byeongsik Jeon bsjeon@hanmail.net --- This is also a problem in Linux. It just seemed to stand out in MacOS(Tahoma builtined) XQuartz2.7.11 Freetype2.7(subpixel turned off).
The truetype bytecode interpreter of the Freetype appears to have the following problems depending on the version. - v35: MS cleartype font(ex. Consolas) rendering is ugly. - v40: MS legacy font (ex. Tahoma) rendering is ugly. Some fonts return the wrong values even for the glyph metrics.
Is this a Freetype bug? Bagically NOT.
https://docs.microsoft.com/en-us/typography/opentype/spec/tt_instructions#ge...
The bytecode interptreter is a stack-based virtual maching the interprets the truetype bytecode instructions. Ths bytecode program receives the interpreter version information through the GETINFO instruction. GETINFO also provided the information of the fontsmoothing, cleartype, etc. The bytecode program actually changes the location of the glyph points based on this information.
So, what looks like a bug above is that the wrong version information was delivered to the bytecode program. To determine this version value, this patch use the gasp table version. This idea is inspired by the following documentation.
https://www.freetype.org/freetype2/docs/reference/ft2-properties.html#TT_INT... -- Note that ‘Gray ClearType’ is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit 12 (hinting for grayscale), while v2.1 returns bits 13 (hinting for ClearType), 18 (symmetrical smoothing), and 19 (Gray ClearType). Also, this mode respects bits 2 and 3 for the version 1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version 0 (bits 0 and 1). -- I think the maximum value that can be applied to the gasp version 0 font is the interpreter version 37.
The Freetype interpreter version 38 includes tweaks based on the font names. I was able to use the v38 by modifying the build option of the Freetype. #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )
This allows the gasp version 0 fonts to be rendered more similar to the Windows old cleartype in the subpixel rendering mode. However, this is not applied because the build option must be modified and the Freetype document is marked as a feature to be deleted.
To quickly check changes with the Freetype version up, I have added the WINE_GDI_PROPERTIES code. WINE_GDI_PROPERTIES="truetype:interpreter-version=35" winecfg
dlls/gdi32/freetype.c | 69 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 07de6f2f6c..1e54e65ed4 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -92,6 +92,15 @@ #ifdef FT_LCD_FILTER_H #include FT_LCD_FILTER_H #endif + +#ifdef FT_DRIVER_H +#include FT_DRIVER_H +#else +#ifdef FT_TRUETYPE_DRIVER_H /* Deprecated since version 2.9 */ +#include FT_TRUETYPE_DRIVER_H +#endif +#endif + #endif /* HAVE_FT2BUILD_H */
#include "windef.h" @@ -130,6 +139,7 @@ typedef struct } FT_Version_t; static FT_Version_t FT_Version; static DWORD FT_SimpleVersion; +static FT_UInt forced_interpreter_version = 0;
static void *ft_handle = NULL;
@@ -158,6 +168,8 @@ MAKE_FUNCPTR(FT_Outline_Get_Bitmap); MAKE_FUNCPTR(FT_Outline_Get_CBox); MAKE_FUNCPTR(FT_Outline_Transform); MAKE_FUNCPTR(FT_Outline_Translate); +MAKE_FUNCPTR(FT_Property_Get); +MAKE_FUNCPTR(FT_Property_Set); MAKE_FUNCPTR(FT_Render_Glyph); MAKE_FUNCPTR(FT_Set_Charmap); MAKE_FUNCPTR(FT_Set_Pixel_Sizes); @@ -399,6 +411,7 @@ struct tagGdiFont { DWORD total_kern_pairs; KERNINGPAIR *kern_pairs; struct list child_fonts; + FT_UInt interpreter_version;
/* the following members can be accessed without locking, they are never modified after creation */ FT_Face ft_face; @@ -4101,6 +4114,20 @@ static void update_font_info(void) } }
+static void set_forced_interpreter_version(void) +{ + static const char property_name[] = "truetype:interpreter-version="; + const char *env; + + env = getenv( "WINE_GDI_PROPERTIES" ); + if ( env && (env = strstr( env, property_name )) ) + { + forced_interpreter_version = atoi( env + sizeof(property_name) - 1 ); + + TRACE( "forced_interpreter_version = %d\n" , forced_interpreter_version ); + } +} + static BOOL init_freetype(void) { ft_handle = wine_dlopen(SONAME_LIBFREETYPE, RTLD_NOW, NULL, 0); @@ -4137,6 +4164,8 @@ static BOOL init_freetype(void) LOAD_FUNCPTR(FT_Outline_Get_CBox) LOAD_FUNCPTR(FT_Outline_Transform) LOAD_FUNCPTR(FT_Outline_Translate) + LOAD_FUNCPTR(FT_Property_Get) + LOAD_FUNCPTR(FT_Property_Set) LOAD_FUNCPTR(FT_Render_Glyph) LOAD_FUNCPTR(FT_Set_Charmap) LOAD_FUNCPTR(FT_Set_Pixel_Sizes) @@ -4164,6 +4193,8 @@ static BOOL init_freetype(void) ((FT_Version.minor << 8) & 0x00ff00) | ((FT_Version.patch ) & 0x0000ff);
+ set_forced_interpreter_version(); + font_driver = &freetype_funcs; return TRUE;
@@ -5153,7 +5184,7 @@ static FT_Encoding pick_charmap( FT_Face face, int charset ) return *encs; }
-static BOOL get_gasp_flags( GdiFont *font, WORD *flags ) +static BOOL get_gasp_flags( GdiFont *font, WORD *flags, WORD *gasp_version ) { DWORD size; WORD buf[16]; /* Enough for seven ranges before we need to alloc */ @@ -5161,7 +5192,8 @@ static BOOL get_gasp_flags( GdiFont *font, WORD *flags ) WORD num_recs, version; BOOL ret = FALSE;
- *flags = 0; + if ( !flags && !gasp_version ) return FALSE; + size = get_font_data( font, MS_GASP_TAG, 0, NULL, 0 ); if (size == GDI_ERROR) return FALSE; if (size < 4 * sizeof(WORD)) return FALSE; @@ -5182,6 +5214,13 @@ static BOOL get_gasp_flags( GdiFont *font, WORD *flags ) goto done; }
+ if (gasp_version) + *gasp_version = version; + + ret = TRUE; + if (!flags) goto done; + + *flags = 0; while (num_recs--) { *flags = GET_BE_WORD( *(ptr + 1) ); @@ -5189,7 +5228,6 @@ static BOOL get_gasp_flags( GdiFont *font, WORD *flags ) ptr += 2; } TRACE( "got flags %04x for ppem %d\n", *flags, font->ft_face->size->metrics.y_ppem ); - ret = TRUE;
done: HeapFree( GetProcessHeap(), 0, alloced ); @@ -5779,6 +5817,8 @@ found_face: done: if (ret) { + WORD gasp_version; + PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSelectFont );
switch (lf.lfQuality) @@ -5810,7 +5850,7 @@ done: if ((!antialias_fakes || (!ret->fake_bold && !ret->fake_italic)) && is_hinting_enabled()) { WORD gasp_flags; - if (get_gasp_flags( ret, &gasp_flags ) && !(gasp_flags & GASP_DOGRAY)) + if (get_gasp_flags( ret, &gasp_flags, NULL ) && !(gasp_flags & GASP_DOGRAY)) { TRACE( "font %s %d aa disabled by GASP\n", debugstr_w(lf.lfFaceName), lf.lfHeight ); @@ -5819,7 +5859,15 @@ done: } } } - TRACE( "%p %s %d aa %x\n", hfont, debugstr_w(lf.lfFaceName), lf.lfHeight, *aa_flags ); + + if (!forced_interpreter_version && get_gasp_flags( ret, NULL, &gasp_version )) + ret->interpreter_version = gasp_version == 0 ? TT_INTERPRETER_VERSION_35 + : TT_INTERPRETER_VERSION_40; + else + ret->interpreter_version = forced_interpreter_version; + + TRACE( "%p %s %d aa_flags %x interpreter_version %d\n", hfont, + debugstr_w(lf.lfFaceName), lf.lfHeight, *aa_flags, ret->interpreter_version ); release_font( physdev->font ); physdev->font = ret; } @@ -7001,6 +7049,17 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format, if (needsTransform || format != GGO_BITMAP) load_flags |= FT_LOAD_NO_BITMAP; if (vertical_metrics) load_flags |= FT_LOAD_VERTICAL_LAYOUT;
+ /* FT_Property_Set and FT_Load_Glyph must be in the same locking section. */ + if (font->interpreter_version && pFT_Property_Set && pFT_Property_Get) + { + FT_UInt interpreter_version = 0; + + pFT_Property_Set( library, "truetype", "interpreter-version", &font->interpreter_version ); + pFT_Property_Get( library, "truetype", "interpreter-version", &interpreter_version ); + if ( interpreter_version != font->interpreter_version ) + FIXME( "truetype:interpreter-version: expected %d, got %d\n", + font->interpreter_version, interpreter_version ); + } err = pFT_Load_Glyph(ft_face, glyph_index, load_flags);
if(err) {
Signed-off-by: Byeongsik Jeon bsjeon@hanmail.net --- dlls/gdi32/dibdrv/dibdrv.h | 3 +- dlls/gdi32/dibdrv/graphics.c | 28 ++++++++++- dlls/gdi32/dibdrv/primitives.c | 88 ++++++++++++++++++++++------------ 3 files changed, 85 insertions(+), 34 deletions(-)
diff --git a/dlls/gdi32/dibdrv/dibdrv.h b/dlls/gdi32/dibdrv/dibdrv.h index 02164c9692..a5ff595496 100644 --- a/dlls/gdi32/dibdrv/dibdrv.h +++ b/dlls/gdi32/dibdrv/dibdrv.h @@ -87,6 +87,7 @@ struct intensity_range
struct font_intensities { + int max_level; struct intensity_range ranges[17]; struct font_gamma_ramp *gamma_ramp; }; @@ -196,7 +197,7 @@ typedef struct primitive_funcs void (* mask_rect)(const dib_info *dst, const RECT *rc, const dib_info *src, const POINT *origin, int rop2); void (* draw_glyph)(const dib_info *dst, const RECT *rc, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges); + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity); void (* draw_subpixel_glyph)(const dib_info *dst, const RECT *rc, const dib_info *glyph, const POINT *origin, DWORD text_pixel, const struct font_gamma_ramp *gamma_ramp); DWORD (* get_pixel)(const dib_info *dib, int x, int y); diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index 7d71fbb12a..9e10ffd4df 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -708,7 +708,7 @@ static void draw_glyph( dib_info *dib, int x, int y, const GLYPHMETRICS *metrics text_color, intensity->gamma_ramp ); else dib->funcs->draw_glyph( dib, &clipped_rect, glyph_dib, &src_origin, - text_color, intensity->ranges ); + text_color, intensity ); } } } @@ -734,6 +734,29 @@ static int get_glyph_depth( UINT aa_flags ) } }
+static int get_glyph_max_level( UINT aa_flags ) +{ + switch (aa_flags) + { + case GGO_BITMAP: /* we'll convert to GGO_GRAY4_BITMAP format */ + case GGO_GRAY4_BITMAP: return 16; + + /* FIXME: confirm the native Windows. */ + case GGO_GRAY2_BITMAP: return 16; + case GGO_GRAY8_BITMAP: return 16; + + case WINE_GGO_HRGB_BITMAP: + case WINE_GGO_HBGR_BITMAP: + case WINE_GGO_VRGB_BITMAP: + case WINE_GGO_VBGR_BITMAP: + case WINE_GGO_GRAY16_BITMAP: return 255; + + default: + ERR("Unexpected flags %08x\n", aa_flags); + return 0; + } +} + static const BYTE masks[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; static const int padding[4] = {0, 3, 2, 1};
@@ -826,7 +849,8 @@ static void render_string( DC *dc, dib_info *dib, struct cached_font *font, INT
text_color = get_pixel_color( dc, dib, dc->textColor, TRUE );
- if (glyph_dib.bit_count == 32) + intensity.max_level = get_glyph_max_level( font->aa_flags ); + if (intensity.max_level == 255) intensity.gamma_ramp = dc->font_gamma_ramp; else get_aa_ranges( dib->funcs->pixel_to_colorref( dib, text_color ), intensity.ranges ); diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c index 01a1c7c1d8..e21c1d6ca7 100644 --- a/dlls/gdi32/dibdrv/primitives.c +++ b/dlls/gdi32/dibdrv/primitives.c @@ -6059,18 +6059,50 @@ static inline BYTE aa_color( BYTE dst, BYTE text, BYTE min_comp, BYTE max_comp ) } }
-static inline DWORD aa_rgb( BYTE r_dst, BYTE g_dst, BYTE b_dst, DWORD text, const struct intensity_range *range ) +static inline BYTE blend_color_gamma( BYTE dst, BYTE text, BYTE alpha, + const struct font_gamma_ramp *gamma_ramp ) { + if (alpha == 0) return dst; + if (alpha == 255) return text; + if (dst == text) return dst; + + return gamma_ramp->encode[ blend_color( gamma_ramp->decode[dst], + gamma_ramp->decode[text], + alpha ) ]; +} + +static inline DWORD aa_rgb( BYTE r_dst, BYTE g_dst, BYTE b_dst, DWORD text, const BYTE alpha, + const struct font_intensities *intensity ) +{ + const struct intensity_range *range; + const struct font_gamma_ramp *gamma_ramp; + + if (intensity->max_level == 255) + { + gamma_ramp = intensity->gamma_ramp; + if (gamma_ramp != NULL && gamma_ramp->gamma != 1000) + { + return blend_color_gamma( r_dst, text >> 16, alpha, gamma_ramp ) << 16 | + blend_color_gamma( g_dst, text >> 8, alpha, gamma_ramp ) << 8 | + blend_color_gamma( b_dst, text, alpha, gamma_ramp ); + } + return blend_color( r_dst, text >> 16, alpha ) << 16 | + blend_color( g_dst, text >> 8, alpha ) << 8 | + blend_color( b_dst, text, alpha ); + } + + range = &intensity->ranges[alpha]; return (aa_color( b_dst, text, range->b_min, range->b_max ) | aa_color( g_dst, text >> 8, range->g_min, range->g_max ) << 8 | aa_color( r_dst, text >> 16, range->r_min, range->r_max ) << 16); }
static void draw_glyph_8888( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { DWORD *dst_ptr = get_pixel_ptr_32( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); + const int max_level = intensity->max_level; int x, y;
for (y = rect->top; y < rect->bottom; y++) @@ -6078,8 +6110,9 @@ static void draw_glyph_8888( const dib_info *dib, const RECT *rect, const dib_in for (x = 0; x < rect->right - rect->left; x++) { if (glyph_ptr[x] <= 1) continue; - if (glyph_ptr[x] >= 16) { dst_ptr[x] = text_pixel; continue; } - dst_ptr[x] = aa_rgb( dst_ptr[x] >> 16, dst_ptr[x] >> 8, dst_ptr[x], text_pixel, ranges + glyph_ptr[x] ); + if (glyph_ptr[x] >= max_level) { dst_ptr[x] = text_pixel; continue; } + dst_ptr[x] = aa_rgb( dst_ptr[x] >> 16, dst_ptr[x] >> 8, dst_ptr[x], + text_pixel, glyph_ptr[x], intensity ); } dst_ptr += dib->stride / 4; glyph_ptr += glyph->stride; @@ -6087,10 +6120,11 @@ static void draw_glyph_8888( const dib_info *dib, const RECT *rect, const dib_in }
static void draw_glyph_32( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { DWORD *dst_ptr = get_pixel_ptr_32( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); + const int max_level = intensity->max_level; int x, y; DWORD text, val;
@@ -6103,11 +6137,11 @@ static void draw_glyph_32( const dib_info *dib, const RECT *rect, const dib_info for (x = 0; x < rect->right - rect->left; x++) { if (glyph_ptr[x] <= 1) continue; - if (glyph_ptr[x] >= 16) { dst_ptr[x] = text_pixel; continue; } + if (glyph_ptr[x] >= max_level) { dst_ptr[x] = text_pixel; continue; } val = aa_rgb( get_field(dst_ptr[x], dib->red_shift, dib->red_len), get_field(dst_ptr[x], dib->green_shift, dib->green_len), get_field(dst_ptr[x], dib->blue_shift, dib->blue_len), - text, ranges + glyph_ptr[x] ); + text, glyph_ptr[x], intensity ); dst_ptr[x] = rgb_to_pixel_masks( dib, val >> 16, val >> 8, val ); } dst_ptr += dib->stride / 4; @@ -6116,10 +6150,11 @@ static void draw_glyph_32( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_24( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { BYTE *dst_ptr = get_pixel_ptr_24( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); + const int max_level = intensity->max_level; int x, y; DWORD val;
@@ -6128,11 +6163,11 @@ static void draw_glyph_24( const dib_info *dib, const RECT *rect, const dib_info for (x = 0; x < rect->right - rect->left; x++) { if (glyph_ptr[x] <= 1) continue; - if (glyph_ptr[x] >= 16) + if (glyph_ptr[x] >= max_level) val = text_pixel; else val = aa_rgb( dst_ptr[x * 3 + 2], dst_ptr[x * 3 + 1], dst_ptr[x * 3], - text_pixel, ranges + glyph_ptr[x] ); + text_pixel, glyph_ptr[x], intensity ); dst_ptr[x * 3] = val; dst_ptr[x * 3 + 1] = val >> 8; dst_ptr[x * 3 + 2] = val >> 16; @@ -6143,10 +6178,11 @@ static void draw_glyph_24( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_555( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { WORD *dst_ptr = get_pixel_ptr_16( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); + const int max_level = intensity->max_level; int x, y; DWORD text, val;
@@ -6159,11 +6195,11 @@ static void draw_glyph_555( const dib_info *dib, const RECT *rect, const dib_inf for (x = 0; x < rect->right - rect->left; x++) { if (glyph_ptr[x] <= 1) continue; - if (glyph_ptr[x] >= 16) { dst_ptr[x] = text_pixel; continue; } + if (glyph_ptr[x] >= max_level) { dst_ptr[x] = text_pixel; continue; } val = aa_rgb( ((dst_ptr[x] >> 7) & 0xf8) | ((dst_ptr[x] >> 12) & 0x07), ((dst_ptr[x] >> 2) & 0xf8) | ((dst_ptr[x] >> 7) & 0x07), ((dst_ptr[x] << 3) & 0xf8) | ((dst_ptr[x] >> 2) & 0x07), - text, ranges + glyph_ptr[x] ); + text, glyph_ptr[x], intensity ); dst_ptr[x] = ((val >> 9) & 0x7c00) | ((val >> 6) & 0x03e0) | ((val >> 3) & 0x001f); } dst_ptr += dib->stride / 2; @@ -6172,10 +6208,11 @@ static void draw_glyph_555( const dib_info *dib, const RECT *rect, const dib_inf }
static void draw_glyph_16( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { WORD *dst_ptr = get_pixel_ptr_16( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); + const int max_level = intensity->max_level; int x, y; DWORD text, val;
@@ -6188,11 +6225,11 @@ static void draw_glyph_16( const dib_info *dib, const RECT *rect, const dib_info for (x = 0; x < rect->right - rect->left; x++) { if (glyph_ptr[x] <= 1) continue; - if (glyph_ptr[x] >= 16) { dst_ptr[x] = text_pixel; continue; } + if (glyph_ptr[x] >= max_level) { dst_ptr[x] = text_pixel; continue; } val = aa_rgb( get_field(dst_ptr[x], dib->red_shift, dib->red_len), get_field(dst_ptr[x], dib->green_shift, dib->green_len), get_field(dst_ptr[x], dib->blue_shift, dib->blue_len), - text, ranges + glyph_ptr[x] ); + text, glyph_ptr[x], intensity ); dst_ptr[x] = rgb_to_pixel_masks( dib, val >> 16, val >> 8, val ); } dst_ptr += dib->stride / 2; @@ -6201,7 +6238,7 @@ static void draw_glyph_16( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_8( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { BYTE *dst_ptr = get_pixel_ptr_8( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); @@ -6221,7 +6258,7 @@ static void draw_glyph_8( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_4( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { BYTE *dst_ptr = get_pixel_ptr_4( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); @@ -6246,7 +6283,7 @@ static void draw_glyph_4( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_1( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { BYTE *dst_ptr = get_pixel_ptr_1( dib, rect->left, rect->top ); const BYTE *glyph_ptr = get_pixel_ptr_8( glyph, origin->x, origin->y ); @@ -6268,21 +6305,10 @@ static void draw_glyph_1( const dib_info *dib, const RECT *rect, const dib_info }
static void draw_glyph_null( const dib_info *dib, const RECT *rect, const dib_info *glyph, - const POINT *origin, DWORD text_pixel, const struct intensity_range *ranges ) + const POINT *origin, DWORD text_pixel, const struct font_intensities *intensity ) { return; } -static inline BYTE blend_color_gamma( BYTE dst, BYTE text, BYTE alpha, - const struct font_gamma_ramp *gamma_ramp ) -{ - if (alpha == 0) return dst; - if (alpha == 255) return text; - if (dst == text) return dst; - - return gamma_ramp->encode[ blend_color( gamma_ramp->decode[dst], - gamma_ramp->decode[text], - alpha ) ]; -}
static inline DWORD blend_subpixel( BYTE r, BYTE g, BYTE b, DWORD text, DWORD alpha, const struct font_gamma_ramp *gamma_ramp )
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=43896
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:580: recipe for target 'freetype.o' failed Makefile:8613: recipe for target 'dlls/gdi32' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:570: recipe for target 'freetype.o' failed Makefile:8338: recipe for target 'dlls/gdi32' failed Task: The wow64 build failed
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41639 Signed-off-by: Byeongsik Jeon bsjeon@hanmail.net --- XQuartz2.7.11 Freetyep2.7 is disabled the subpixel rendering. https://bugs.winehq.org/show_bug.cgi?id=41639#c35 https://bugs.winehq.org/show_bug.cgi?id=41639#c40
This improves the quality of the gray antialias rendering at the subpixel rendering *fallback* mode.
dlls/gdi32/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 1e54e65ed4..c4d5a5a12b 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5841,7 +5841,7 @@ done: case WINE_GGO_VRGB_BITMAP: case WINE_GGO_VBGR_BITMAP: if (is_subpixel_rendering_enabled()) break; - *aa_flags = GGO_GRAY4_BITMAP; + *aa_flags = WINE_GGO_GRAY16_BITMAP; /* fall through */ case GGO_GRAY2_BITMAP: case GGO_GRAY4_BITMAP:
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=43897
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:580: recipe for target 'freetype.o' failed Makefile:8613: recipe for target 'dlls/gdi32' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:570: recipe for target 'freetype.o' failed Makefile:8338: recipe for target 'dlls/gdi32' failed Task: The wow64 build failed
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=43895
Your paranoid android.
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:580: recipe for target 'freetype.o' failed Makefile:8613: recipe for target 'dlls/gdi32' failed Task: The win32 build failed
=== debian9 (build log) ===
../../../wine/dlls/gdi32/freetype.c:5865:60: error: ‘TT_INTERPRETER_VERSION_40’ undeclared (first use in this function) Makefile:570: recipe for target 'freetype.o' failed Makefile:8338: recipe for target 'dlls/gdi32' failed Task: The wow64 build failed