… | |
… | |
60 | if (size > alloc) |
60 | if (size > alloc) |
61 | { |
61 | { |
62 | size = (size + 4095) & ~4095; |
62 | size = (size + 4095) & ~4095; |
63 | free (buffer); |
63 | free (buffer); |
64 | alloc = size; |
64 | alloc = size; |
65 | buffer = malloc (size); |
65 | buffer = (char *)malloc (size); |
66 | } |
66 | } |
67 | |
67 | |
68 | return buffer; |
68 | return buffer; |
69 | } |
69 | } |
70 | |
70 | |
… | |
… | |
90 | glyph->width = width; |
90 | glyph->width = width; |
91 | glyph->height = height; |
91 | glyph->height = height; |
92 | glyph->top = top; |
92 | glyph->top = top; |
93 | glyph->left = left; |
93 | glyph->left = left; |
94 | |
94 | |
95 | glyph->bitmap = temp_buffer (width * height); |
95 | glyph->bitmap = (uint8_t *)temp_buffer (width * height); |
96 | memset (glyph->bitmap, 0, glyph->stride * height); |
96 | memset (glyph->bitmap, 0, glyph->stride * height); |
97 | |
97 | |
98 | for (i = width; i--; ) |
98 | for (i = width; i--; ) |
99 | glyph->bitmap [i] = glyph->bitmap [i + (height - 1) * glyph->stride] = 0xff; |
99 | glyph->bitmap [i] = glyph->bitmap [i + (height - 1) * glyph->stride] = 0xff; |
100 | |
100 | |
… | |
… | |
210 | |
210 | |
211 | if (glyph == PANGO_GLYPH_EMPTY) |
211 | if (glyph == PANGO_GLYPH_EMPTY) |
212 | glyph = PANGO_GLYPH_UNKNOWN_FLAG; |
212 | glyph = PANGO_GLYPH_UNKNOWN_FLAG; |
213 | } |
213 | } |
214 | |
214 | |
215 | g = _pango_opengl_font_get_cache_glyph_data (font, glyph); |
215 | g = (glyph_info *)_pango_opengl_font_get_cache_glyph_data (font, glyph); |
216 | |
216 | |
217 | if (!g || g->generation != tc_generation) |
217 | if (!g || g->generation != tc_generation) |
218 | { |
218 | { |
219 | Glyph bm; |
219 | Glyph bm; |
220 | font_render_glyph (&bm, font, glyph); |
220 | font_render_glyph (&bm, font, glyph); |
… | |
… | |
341 | gl->key.format = 0; // glyphs |
341 | gl->key.format = 0; // glyphs |
342 | gl->key.texname = 0; |
342 | gl->key.texname = 0; |
343 | |
343 | |
344 | for (l = run->item->analysis.extra_attrs; l; l = l->next) |
344 | for (l = run->item->analysis.extra_attrs; l; l = l->next) |
345 | { |
345 | { |
346 | PangoAttribute *attr = l->data; |
346 | PangoAttribute *attr = (PangoAttribute *)l->data; |
347 | |
347 | |
348 | switch (attr->klass->type) |
348 | switch (attr->klass->type) |
349 | { |
349 | { |
350 | case PANGO_ATTR_UNDERLINE: |
350 | case PANGO_ATTR_UNDERLINE: |
351 | renderer->underline = ((PangoAttrInt *)attr)->value; |
351 | renderer->underline = (PangoUnderline)((PangoAttrInt *)attr)->value; |
352 | break; |
352 | break; |
353 | |
353 | |
354 | case PANGO_ATTR_STRIKETHROUGH: |
354 | case PANGO_ATTR_STRIKETHROUGH: |
355 | renderer->strikethrough = ((PangoAttrInt *)attr)->value; |
355 | renderer->strikethrough = ((PangoAttrInt *)attr)->value; |
356 | break; |
356 | break; |