Page 1 of 1

Noto Sans CJK OTF font padding is quite different by comparing to Photoshop result

Posted: 2019-06-18T02:26:34-07:00
by Kenneth
Hello There!

I'm using ImageMagick7 to render the text with Noto Sans CJK JP font

However, There seems an issue when We render Noto Sans font (https://www.google.com/get/noto/#sans-jpan)

We have tried with covert command to check the sample of the result

But the result has quite large padding (or line height) on each line of text

Check the following result

Image

The left one is Photoshop's result



And below is our convert command

convert -background white -fill black -pointsize 64 -font /Users/user/Downloads/NotoSansCJKjp-hinted/test.otf label:'test\ntest' output.png

// test.otf was `Noto Sans CJK JP Medium.otf`



And this is metric information from FontForge

Image

Re: Noto Sans CJK OTF font padding is quite different by comparing to Photoshop result

Posted: 2019-06-18T08:17:15-07:00
by fmw42
In ImageMagick 7, use magick not convert and not magick convert. Otherwise, you might get IM 6 results. Don't know if this will make any difference.

Re: Noto Sans CJK OTF font padding is quite different by comparing to Photoshop result

Posted: 2019-06-19T23:43:04-07:00
by Kenneth
@fmw42

Oh.. I see thank you for informing it

And I tested also with the magick command today

But the result seems no different

Image

Following is the command which i used

magick -background white -fill black -pointsize 64 -font /Users/user/Downloads/NotoSansCJKjp-hinted/test.otf label:'test\ntest' output.png

test.otf is NotoSansCJKjp-Medium.otf

Right one is the result from Imagemagick and Left one is from Photoshop

----

$magick -version


Version: ImageMagick 7.0.8-49 Q16 x86_64 2019-06-13 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1)
Delegates (built-in): bzlib freetype heic jng jp2 jpeg lcms ltdl lzma openexr png tiff webp xml zlib

Re: Noto Sans CJK OTF font padding is quite different by comparing to Photoshop result

Posted: 2019-06-20T07:51:39-07:00
by fmw42
As far as I can tell, it works fine for me on IM 7.0.8.49 Q16 HDRI Mac OSX Sierra and freetype 2.9.1.

I get the following:

Code: Select all

magick -background white -fill black -pointsize 64 -font /Library/fonts/NotoSansCJKjp-Medium.otf label:'test\ntest' NotoSansCJKjp_mediam_output7.png
Image

Is your freetype current?

Re: Noto Sans CJK OTF font padding is quite different by comparing to Photoshop result

Posted: 2019-06-20T23:37:28-07:00
by Kenneth
@fmw42

Thank you for showing the result on your environment

But Your result is same as our result, The problem is ImageMagick uses a large of padding among the OTF

There is a lot of looks different between the other rendering solution when we use OTF font such as NotoSans CJK JP

You can check the padding at above image (the gray one of Photoshop result), They have a small line-height even they use 0 word spacing (font size leading)


BTW, Thank you again for giving attention to this problem