Forum > LazUtils
[Solved]LazFreeType parasitic contours
Windsurfer:
This is just a guess. It looks as though the last two points are provided as a quick look up to work out the width of each character. My guess is that the x, y values are reversed for the advance width point.
zamtmn:
Thanks all! Issue was resolved.
1. Need to handle outline.n_points-3 points. Last 2 points always "phantom"
2. Need to be prepared to meet the contour consisting of only one point. And drop this contour
Graeme:
--- Quote from: Windsurfer on June 17, 2016, 09:39:57 am ---This is just a guess. It looks as though the last two points are provided as a quick look up to work out the width of each character. My guess is that the x, y values are reversed for the advance width point.
--- End quote ---
Yeah, and that sounds like a perfect Microsoft hack. And probably explains why most or all non-Microsoft supplied fonts don't have that. The TTF file has perfectly well defined fields supplying that information - there is no need for such a hacks.
I guess now font rendering libraries like FreeType etc needs to do:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- if Font.Manufacturer = 'Microsoft Corporation' then result := xyz // do shitty hack else result := outline.n_points;
Navigation
[0] Message Index
[*] Previous page