Commit 8538f29f authored by Vincent Wei's avatar Vincent Wei
Browse files

fixbug: No need to make the pitch of FT2 monobitmap is single-byte aligned

parent b6584139
......@@ -5505,8 +5505,9 @@ MG_EXPORT int GUIAPI SubtractRect (RECT* rc, const RECT* psrc1, const RECT* psrc
#define FS_FLIP_HORZVERT 0x00003000 /* HORZ | VERT */
#define FONT_OTHER_NIL '\0'
#define FONT_OTHER_NONE 'n'
#define FONT_OTHER_AUTOSCALE 's'
#define FONT_OTHER_TTFNOCACHE 'n'
#define FONT_OTHER_TTFNOCACHE 'c'
#define FONT_OTHER_TTFKERN 'k'
#define FONT_OTHER_TTFNOCACHEKERN 'r'
#define FONT_OTHER_LCDPORTRAIT 'p'
......
......@@ -618,6 +618,8 @@ __mg_ttc_is_exist(char *family, char *charset,
&& (style & FS_RENDER_MASK) == p->cache.render_style) {
return (HCACHE) p;
}
p = p->nextCache;
}
#endif
......
......@@ -461,6 +461,7 @@ get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
return (int)(bbox.xMax - bbox.xMin);
}
#if 0 // VincentWei: Bad implementation
/* press double-byte align to byte align.*/
static void
press_bitmap (void* buffer, int width, int rows, int pitch)
......@@ -482,7 +483,7 @@ press_bitmap (void* buffer, int width, int rows, int pitch)
dest_pos += dest_pitch;
}
}
#endif
/* call this function to get the bitmap/pixmap of the char */
static const void*
......@@ -557,11 +558,15 @@ char_bitmap_pixmap (LOGFONT* logfont, DEVFONT* devfont,
if (pitch)
*pitch = source->pitch;
#if 0 // VincentWei: Bad implementation
if (!is_grey) {
press_bitmap(source->buffer,
source->width, source->rows, source->pitch);
*pitch = (source->width + 7) >> 3;
}
#else
*pitch = source->pitch;
#endif
#ifdef _MGFONT_TTF_CACHE
if (ft_inst_info->cache && (ft_inst_info->rotation == 0)) {
......
......@@ -167,7 +167,7 @@ int GUIAPI DrawGlyph (HDC hdc, int x, int y, Glyph32 glyph_value,
advance = 0;
}
else {
int my_adv_x, my_adv_y;
int my_adv_x, my_adv_y;
/* convert to the start point on baseline. */
_gdi_get_baseline_point (pdc, &x, &y);
......@@ -2961,8 +2961,8 @@ nodraw_ret:
#define GET_RGBA(Cs, x, y) \
{ \
unsigned char dR,dG,dB,dA; \
gal_pixel tmppixel; \
unsigned char dR,dG,dB,dA; \
gal_pixel tmppixel; \
MOVETOPIXEL(x, y); \
DISEMBLE_RGBA (pdc->cur_dst, \
pdc->surface->format->BytesPerPixel,\
......@@ -3732,7 +3732,7 @@ static BOOL _gdi_get_glyph_data (PDC pdc, Glyph32 glyph_value,
if (scale > 1 && ctxt->cb != _dc_regular_scan_line) {
data = _gdi_expand_scale_bits (data, bbox, pitch, bold, scale);
/* note: pitch is modify. */
/* note: pitch is modified. */
pitch = (bbox->cx + 7) / 8;
}
else if (bold) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment