Mercurial > otakunoraifu
comparison font/font_peer_ft2.cc @ 65:4416cfac86ae
Convert EUC-JP files to UTF8
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Fri, 26 Nov 2010 10:53:15 +0100 |
parents | 15a18fbe6f21 |
children |
comparison
equal
deleted
inserted
replaced
64:045ca45f9610 | 65:4416cfac86ae |
---|---|
226 | 226 |
227 /* Don't consider error */ | 227 /* Don't consider error */ |
228 slot = face->glyph; | 228 slot = face->glyph; |
229 if (slot) { | 229 if (slot) { |
230 // if (! FT_Load_Glyph(face, index, FT_LOAD_DEFAULT)) { | 230 // if (! FT_Load_Glyph(face, index, FT_LOAD_DEFAULT)) { |
231 // BITMAP だと なぜか render してくれない…… | 231 // BITMAP render |
232 // LOAD_DEFAULT でも、下に対応コードを付けたので一応は大丈夫 | 232 // LOAD_DEFAULT с筝絲上潟若篁т綽紊т紊 |
233 if (! FT_Load_Glyph(face, index, FT_LOAD_NO_BITMAP)) | 233 if (! FT_Load_Glyph(face, index, FT_LOAD_NO_BITMAP)) |
234 FT_Render_Glyph(slot, ft_render_mode_normal); | 234 FT_Render_Glyph(slot, ft_render_mode_normal); |
235 } | 235 } |
236 | 236 |
237 glyph->bitmap_left = slot->bitmap_left; | 237 glyph->bitmap_left = slot->bitmap_left; |
250 bmsize = glyph->bitmap.width * glyph->bitmap.rows; | 250 bmsize = glyph->bitmap.width * glyph->bitmap.rows; |
251 if (bmsize > 0) { | 251 if (bmsize > 0) { |
252 glyph->bitmap.buffer = new unsigned char[bmsize]; | 252 glyph->bitmap.buffer = new unsigned char[bmsize]; |
253 memcpy(glyph->bitmap.buffer, slot->bitmap.buffer, bmsize); | 253 memcpy(glyph->bitmap.buffer, slot->bitmap.buffer, bmsize); |
254 } | 254 } |
255 // なぜか Render したのに MONO なことがある…… | 255 // Render MONO |
256 /* for freetype < 2.1.3, use ``ft_pixel_mode_mono'' */ | 256 /* for freetype < 2.1.3, use ``ft_pixel_mode_mono'' */ |
257 if (slot->bitmap.pixel_mode == ft_pixel_mode_mono) { | 257 if (slot->bitmap.pixel_mode == ft_pixel_mode_mono) { |
258 int i, j; | 258 int i, j; |
259 // if (slot->bitmap.pixel_mode == FT_PIXEL_MODE_MONO) {int i,j; | 259 // if (slot->bitmap.pixel_mode == FT_PIXEL_MODE_MONO) {int i,j; |
260 char* d = (char*)slot->bitmap.buffer; | 260 char* d = (char*)slot->bitmap.buffer; |