MantisBT - VTK | |||||
View Issue Details | |||||
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 | ||||
Project | TBD | ||||
Type | incorrect functionality | ||||
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) | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|