freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FT_Glyph_Stroke(): Unexpected outline glyph bitmap


From: Timo Suoranta
Subject: FT_Glyph_Stroke(): Unexpected outline glyph bitmap
Date: Mon, 11 May 2020 11:59:29 +0300

I managed to align outline stroked glyph bitmap with non-outline, 'normal' glyph bitmap.
But I get unexpected outline glyph rendering results:
* Ubuntu-R.ttf as font, size set to 16, outline thickness 8.
* I have included ASCII dump of glyphs below. I can now align these, but there is unexpected gap between outline and normal glyph.
* I get unexpected bitmap for . with FT_Glyph_Stroke() (large gap). (dump below)
* I get correct looking bitmap for . with FT_Glyph_StrokeBorder(..., 0, 0). (not dumped)
* I get unexpected bitmap for % with FT_Glyph_StrokeBorder(..., 0, 0) (small gap) (not dumped)
Thanks for any help you can provide.

glyph index = 17 code = '.': width = 4 height = 3 left = 1 top = 3 outline = 0.0
|.##:|
|####|
|.##:|
______________________________

glyph index = 17 code = '.': width = 20 height = 19 left = -7 top = 11 outline = 8.0
|      :######:      |
|    .##########:    |
|   :#############   |
|  :#####.  .######  |
| .####.      .####: |
| ####.        .#### |
|.####          :###.|
|:###.           ####|
|:###            ####|
|####            ####|
|:###            ####|
|:###.           ####|
|.####          :###.|
| ####.        .#### |
| .####.      .####: |
|  :#####:  .######  |
|   :#############   |
|    .##########:    |
|      :######:      |
______________________________


Aligned:
|                                      |
|       \\\\\\\\                       |
|      \\\\\\\\\\\                     |
|    \\\\\\\\\\\\\\                    |
|   \\\\\\    \\\\\\                   |
|   \\\\        \\\\\                  |
|  \\\\          \\\\                  |
|  \\\\          \\\\                  |
| \\\\            \\\\                 |
| \\\\     ///    \\\\                 |
| \\\\    ////    \\\\                 |
| \\\\     ///    \\\\                 |
| \\\\            \\\\                 |
|  \\\\          \\\\                  |
|  \\\\          \\\\                  |
|   \\\\        \\\\\                  |
|   \\\\\\\   \\\\\\                   |
|    \\\\\\\\\\\\\\                    |
|      \\\\\\\\\\\                     |
|       \\\\\\\\                       |
|                                      |


reply via email to

[Prev in Thread] Current Thread [Next in Thread]