View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015335 | VTK | (No Category) | public | 2015-02-20 11:14 | 2016-08-12 09:55 | ||||
Reporter | Luc Habert | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015335: vtkFreeTypeTools expects bitmaps where pixel_mode==FT_PIXEL_MODE_GRAY but freetype sometimes returns mono bitmaps | ||||||||
Description | With Calibri size 12, freetype returns bitmaps where pixel_mode==FT_PIXEL_MODE_MONO, which are rejected by vtkFreeTypeTools. I could get it to work by modifying the loop in vtkFreeTypeTools::RenderCharacter : bool gray = bitmap->pixel_mode == FT_PIXEL_MODE_GRAY; for (int j = 0; j < bitmap->rows; ++j) { int iB = 0, ib = 7; for (int i = 0; i < bitmap->width; ++i) { unsigned char value; if (gray) { value = glyphPtrRow[i]; } else { value = 255 * (glyphPtrRow[iB] & 1 << ib); if (ib == 0) { ib = 7; ++iB; } else { --ib; } } then replace "*glyphPtr" with "value". Finally, later in the file, replace if (bitmap->pixel_mode != ft_pixel_mode_grays) with if (bitmap->pixel_mode != ft_pixel_mode_grays && bitmap->pixel_mode != FT_PIXEL_MODE_MONO) | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0034268) Luc Habert (reporter) 2015-02-20 11:21 |
Actually, 255 * (glyphPtrRow[iB] & 1 << ib); was fairly stupid of mine. The correct version is value = (glyphPtrRow[iB] & 1 << ib) ? 255 : 0; |
(0037367) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-02-20 11:14 | Luc Habert | New Issue | |
2015-02-20 11:21 | Luc Habert | Note Added: 0034268 | |
2016-08-12 09:55 | Kitware Robot | Note Added: 0037367 | |
2016-08-12 09:55 | Kitware Robot | Status | backlog => closed |
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |