Any good news?
Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
None. The rendering code in ImageMagick looks good. Freetype does have an option to enable better hinting, disabled by default due to patent issues. That may help. If you find an app that does a better job with rendering that uses Freetype, let us know. We'll investigate further.
How can I use this «option»? A specific flag in the source code of ImageMagick to compile custom version? Or some command-line option in the regular one?
The flag is in the Freetype delegate library. Download, read the docs looking for the comment about patents, enable the FLAG as the suggest, build, and install. ImageMagick will then use the improve hinting when it renders.
Ok. Thanks. And another question:
Is this the only change that relates to improving the «mono font rendering»?
Code: Select all
[ImageMagick-7.0.10-2\ImageMagick\MagickCore\draw.c, 4697] beta=delta.x*(y-q->y)-delta.y*(x-q->x); [ImageMagick-7.0.10-3\ImageMagick\MagickCore\draw.c, 4697] beta=delta.x*(y-q->y)-delta.y*(x-q->x)+MagickEpsilon;
Yes, I found it. Not in the v7.0.10-3, but in the next v7.0.10-4, with the «bounds.xMax == 0» label size fix in the same function.
It seems that only the fix («+MagickEpsilon») between v7.0.10-2 and v7.0.10-3 affects the font rendering (artifacts, like a «missing slash»), and there is no difference in font rendering between v7.0.10-3 and newer versions up to v7.0.10-6, despite the addition of the FT_LOAD_RENDER flag in v7.0.10-4.
No. The flag FT_LOAD_RENDER affects drawing. This confusion arose because the source code was confused. The FT_LOAD_RENDER flag is not in the source ImageMagick-7.0.10-3.7z, but ImageMagick-7.0.10-3-Q16-x64-dll.exe contains it!
Issue with shift of symbols. «Courier New»:
and «Microsoft Sans Serif»:
I found an error in the code due to which there was a shift of characters in mono mode. The problem was that the value bitmap->left was lost the next time point.x was assigned in the ft_pixel_mode_mono condition. So I changed one line (MagickCore\annotate.c, 1646) to fix it.
And voila. Issue has disappeared.
The «Courier New» font rendering result is identical to Notepad. Except for '\' and 'a' characters.
The «Microsoft Sans Serif» font rendering result is identical to Notepad. Except for '78dgq' characters.
Compare the first two pictures, and the last two pictures in my post 2020-04-29T14:31:39+03:00. The issue appeared after adding the FT_LOAD_RENDER flag in v7.0.10-4. This results in incorrect character spacing and text distortion. Compare:
Yes. I downloaded and installed v7.0.10-10. The issue is the same. Need the code fix that I described above.
«Courier New» shifted symbols:
«Microsoft Sans Serif» shifted symbols:
Can you fix this issue of merged 't' and '.' symbols? Started from v7.0.10-3 and up to v7.0.10-10:Suntor wrote: ↑2020-03-31T01:14:24-07:00
Code: Select all
for /l %i in (8,1,22) do @convert -font Microsoft-Sans-Serif -density 96 -pointsize %i +antialias label:"%i C:\\test.txt" test_%i.png ren test_8.png test_08.png && ren test_9.png test_09.png && convert test_*.png -append test.png && del test_*.png
...by changing one line of code, as I showed earlier: