notofonts / noto-cjk

Noto CJK fonts
http://www.google.com/get/noto/help/cjk
3.03k stars 217 forks source link

Missing degree symbol #152

Closed drvic10k closed 5 years ago

drvic10k commented 5 years ago

Degree symbol is displayed as tofu using Noto Sans CJK CS otf font

The degree sign is included in Unicode as U+00B0 ° DEGREE SIGN (HTML ° ° )

image

it is correctly displayed in Noto Sans

kenlunde commented 5 years ago

@davelab6 & @marekjez86 This is a post-processing issue, as all of the Noto CJK fonts that I deliver include a glyph and mapping for U+00B0. Here is output from the Regular weight of the font in question showing the mapping in the Format 4 (UTF-16 BMP-only) and Format 12 (UTF-32) 'cmap' subtables:

% spot -tcmap=7 -C4 NotoSansCJKsc-Regular.otf | grep 00B0
[00B0]=<\110> 
% spot -tcmap=7 -C5 NotoSansCJKsc-Regular.otf | grep 000000B0
[000000B0]=<\110> 
marekjez86 commented 5 years ago

@drvic10k : could you tell me how you got this Noto Sans CJK CS otf font ? Where was it from?

drvic10k commented 5 years ago

@marekjez86 I got it from here: https://www.google.com/get/noto/#sans-hans

kenlunde commented 5 years ago

@drvic10k I followed that link, clicked the red DOWNLOAD button, unpacked the ZIP file that downloaded, then inspected the fonts. Although they're older (Version 1.004; the latest is 2.001), the mapping for U+00B0 ° DEGREE SIGN is present in all nine fonts, in both their Format 4 and Format 12 'cmap' subtables. Try getting them from here instead.

drvic10k commented 5 years ago

@kenlunde I tried the link you suggested and the problem persists

kenlunde commented 5 years ago

@drvic10k I just downloaded NotoSansCJKsc-Regular.otf from the same link, and the following demonstrates that the Format 4 and Format 12 'cmap' subtables map U+00B0 ° DEGREE SIGN to CID+110:

% spot -tcmap=7 -C4 NotoSansCJKsc-Regular.otf | grep 00B0
[00B0]=<\110>
% spot -tcmap=7 -C5 NotoSansCJKsc-Regular.otf | grep 000000B0
[000000B0]=<\110>

Whatever app or environment you are using is somehow preventing the mapping from working. There is nothing to be fixed in the font.

drvic10k commented 5 years ago

@kenlunde I did some investigation and it turns out, that the problem is with the character we were using, it is not U+00B0 : DEGREE SIGN, but U+02DA : RING ABOVE instead

when I replaced it with 00b0, it is displaying correctly

thanks for the help and sorry for the confusion

kenlunde commented 5 years ago

We refer to that as pilot error. 😉