notofonts / symbols

Noto Symbols
SIL Open Font License 1.1
14 stars 4 forks source link

NotoSansSymbols-Regular is not monospaced #7

Closed hyc closed 1 year ago

hyc commented 8 years ago

On Android up to KitKat, DroidSansFallback.ttf supplied Box Drawing characters and various other graphic characters. These were aligned with DroidSansMono. On Android Lollipop and Marshmallow the Box Drawing characters and other graphics ranges have been removed from DroidSansFallback and NotoSansSymbols-Regular has been used instead. However, since NotoSansSymbols-Regular is not monospaced, monospaced displays using these graphics characters are completely jumbled and misaligned.

First noted here http://stackoverflow.com/questions/33226826/nexus-5-monospace-font-has-different-width-for-unicode-circles

The Box Drawing characters are quite broken now, because of the leading in their definitions they don't actually connect to draw complete boxes, there are major gaps and misalignments between each component.

xiangyexiao commented 8 years ago

Noto Sans CJK includes box drawing characters. The characters connect well. Look at this image

screen shot 2016-02-17 at 4 58 58 pm

I assume the box drawing characters here come from another font (Roboto/Noto Symbol)? Can we solve the issue by adjusting the font fallback chain?

dougfelt commented 8 years ago

I think people who use box drawing characters also lay out text within them, basically this is what constituted a graphical UI circa 1980. You'd need monospace ASCII/Latin-1 and monospace box drawing characters that matched.

On Wed, Feb 17, 2016 at 5:01 PM, Xiangye Xiao notifications@github.com wrote:

Noto Sans CJK includes box drawing characters. The characters connect well. Look at this image [image: screen shot 2016-02-17 at 4 58 58 pm] https://cloud.githubusercontent.com/assets/12721521/13130283/ccfa0e80-d597-11e5-9533-8ea6465c60f9.png

I assume the box drawing characters here come from another font (Roboto/Noto Symbol)? Can we solve the issue by adjusting the font fallback chain?

— Reply to this email directly or view it on GitHub https://github.com/googlei18n/noto-fonts/issues/617#issuecomment-185485851 .

hyc commented 8 years ago

Fyi, here's a screenshot of a Connectbot SSH session, running finch (IM client). Using the NotoSans fonts: screenshot_20160218-070427

Without NotoSans fonts, and with the old DroidSansFallback (notice the minus sign is also too narrow in this shot, but we can ignore that if this is already deprecated) screenshot_20160218-065950

hyc commented 8 years ago

(And in both cases, the vertical bars don't connect though they should.)

With the NotoSans fonts installed (Android default setup) the vertical bars are narrower than a character cell, the horizontal bars are wider than a character cell, and none of the corners connect.

dougfelt commented 8 years ago

Thanks for the illustrations. @Xiangye, this is exactly the use box drawing is intended for. They have to be monospace, designed to merge adjacent lines, and share advance width/height with (at least) ASCII and probably Latin-1.

It might be that the CJK Monospace fonts work for this use, but then you're not using fallback, both the characters and the Latin-1 must come from the CJK font unless we're guaranteeing that Noto Mono and CJK have the same advance widths as the box characters in CJK and the same ascent/descent/line height, and I don't know that we are. Personally, I think CJK is rather big to suggest that everyone use it for terminal emulation.

On Wed, Feb 17, 2016 at 11:13 PM, hyc notifications@github.com wrote:

(And in both cases, the vertical bars don't connect though they should.)

— Reply to this email directly or view it on GitHub https://github.com/googlei18n/noto-fonts/issues/617#issuecomment-185574960 .

codeman38 commented 8 years ago

The box-drawing characters in Noto Sans Symbols also appear to be monospaced (at least looking at the font file itself), but still have the same issue as CJK, in that their advance width is larger than that of Noto Mono.

However, I'm wondering if there's another font that's taking precedence even before that. The upper-left and upper-right corners (U+250C , U+2510 ) in @hyc's screenshot don't seem to match those in Noto Sans Symbols-- the ones in the screenshot are aligned to the top of the character cell, while those in Noto Sans Symbols are aligned to the middle. (Even if it was a height difference in the font, they should still be aligning with U+2500 from the same font, at the very least.)

Edited to add: Found it! For whatever reason, the NotoSansSyriac fonts have 0x250C and 0x2510, but not any of the other box-drawing characters, in them.

xiangyexiao commented 8 years ago

So, to solve the issue:

The question here is: which fonts do these box-drawing characters and mono-space ASCII glyphs come from in Android now. I checked several possibilities. None of them have (U+250C ┌, U+2510 ┐) placed at upper-left and upper-right corners

screen shot 2016-02-18 at 11 26 51 am
xiangyexiao commented 8 years ago

@KatMomoi could your team try to reproduce this issue?

codeman38 commented 8 years ago

@xiangyexiao As I mentioned in my own comment earlier, U+250C and U+2510 seem to be coming from one of the NotoSansSyriac fonts.

dougfelt commented 8 years ago

It seems we should add all the box drawing characters to Noto Mono, and let users specify this font to be used before other Noto fonts. Fallback would not work correctly because the other Noto fonts aren't monospace, but at least you wouldn't get missing glyphs, though I suppose that depends on user preference. If Noto Mono is in the fallback chain then perhaps we wouldn't need the box drawing characters in any other Noto font, unless there are custom Syriac variants of these characters for some reason... maybe U+250C only got put into Syriac because it's in cp864 and the designer started with a font based on that.

On Thu, Feb 18, 2016 at 11:39 AM, codeman38 notifications@github.com wrote:

@xiangyexiao https://github.com/xiangyexiao As I mentioned in my own comment earlier, U+250C and U+2510 seem to be coming from one of the NotoSansSyriac fonts.

— Reply to this email directly or view it on GitHub https://github.com/googlei18n/noto-fonts/issues/617#issuecomment-185884920 .

hyc commented 8 years ago

That sounds good for me, but that guy on stackoverflow still needs circles and various other symbols. http://stackoverflow.com/questions/33226826/nexus-5-monospace-font-has-different-width-for-unicode-circles

dougfelt commented 8 years ago

Unfortunately, that bug is pretty generic about what additional characters it actually requires to be monospace-- the original poster only mentions the circles. DroidSansFallback is a catchall font that for example supports all of CJK and a bunch of other stuff. It's unlikely that we're going to create monospace versions of all of the characters there, so we'd need more specificity about what people actually want to do with a monospace font. We can of course add some characters from NotoSansSymbols-- but Symbols is itself a bit of a catchall font, and I think we'd still want some more restricted subset of characters that must be compatible with or in NotoMono.

On Thu, Feb 18, 2016 at 1:29 PM, hyc notifications@github.com wrote:

That sounds good for me, but that guy on stackoverflow still needs circles and various other symbols. http://stackoverflow.com/questions/33226826/nexus-5-monospace-font-has-different-width-for-unicode-circles

— Reply to this email directly or view it on GitHub https://github.com/googlei18n/noto-fonts/issues/617#issuecomment-185930571 .

xiangyexiao commented 8 years ago

codeman38 is right. seems that U+250C and U+2510 come from Noto Sans Syriac Eastern/Western.

screen shot 2016-02-19 at 4 34 56 pm
xiangyexiao commented 8 years ago

Noto Sans Syriac Estrangela has U+250C and U+2510 too.

screen shot 2016-02-19 at 4 48 14 pm
xiangyexiao commented 8 years ago

@dougfelt Please give MTI the list of characters that the monospace font needs to include.

roozbehp commented 8 years ago

I believe the minimum set for the Mono font is CP437 (https://en.wikipedia.org/wiki/Code_page_437).

dougfelt commented 7 years ago

@waksmonskiMT Sue, just a reminder that box drawing characters need to be designed so they work for their intended purpose. For phase III these are in the monospace font.

xnoreq commented 7 years ago

@xiangyexiao You may want to add DejaVu Sans Mono to your image, because that's the font I'm using right now where box drawing works.

Also, from my bug (#757): Box Drawing Unicode block: http://www.unicode.org/charts/PDF/U2500.pdf

alive-corpse commented 7 years ago

I have Android 5.1, but there is nothing like NotoSansSyriac in /system/fonts. Here you can see my font list: AndroidClock.ttf AndroidClock_Highlight.ttf AndroidClock_Solid.ttf CarroisGothicSC-Regular.ttf Clockopia.ttf ComingSoon.ttf DancingScript-Bold.ttf DancingScript-Regular.ttf DroidSans-Bold.ttf DroidSans.ttf DroidSansFallback.ttf DroidSansMono.ttf HYQiHei-35S.otf HYQiHei-45S.otf HYQiHei-55S.otf HYQiHeiE.ttf HYQiHeiFallback.otf MTLmr3m.ttf NanumGothic.ttf NotoColorEmoji.ttf NotoNaskh-Bold.ttf NotoNaskh-Regular.ttf NotoNaskhUI-Bold.ttf NotoNaskhUI-Regular.ttf NotoSansArmenian-Bold.ttf NotoSansArmenian-Regular.ttf NotoSansBengali-Bold.ttf NotoSansBengali-Regular.ttf NotoSansBengaliUI-Bold.ttf NotoSansBengaliUI-Regular.ttf NotoSansDevanagari-Bold.ttf NotoSansDevanagari-Regular.ttf NotoSansDevanagariUI-Bold.ttf NotoSansDevanagariUI-Regular.ttf NotoSansEthiopic-Bold.ttf NotoSansEthiopic-Regular.ttf NotoSansGeorgian-Bold.ttf NotoSansGeorgian-Regular.ttf NotoSansHebrew-Bold.ttf NotoSansHebrew-Regular.ttf NotoSansKannada-Bold.ttf NotoSansKannada-Regular.ttf NotoSansKannadaUI-Bold.ttf NotoSansKannadaUI-Regular.ttf NotoSansKhmer-Bold.ttf NotoSansKhmer-Regular.ttf NotoSansKhmerUI-Bold.ttf NotoSansKhmerUI-Regular.ttf NotoSansLao-Bold.ttf NotoSansLao-Regular.ttf NotoSansLaoUI-Bold.ttf NotoSansLaoUI-Regular.ttf NotoSansMalayalam-Bold.ttf NotoSansMalayalam-Regular.ttf NotoSansMalayalamUI-Bold.ttf NotoSansMalayalamUI-Regular.ttf NotoSansMyanmar-Bold.ttf NotoSansMyanmar-Regular.ttf NotoSansMyanmarUI-Bold.ttf NotoSansMyanmarUI-Regular.ttf NotoSansSymbols-Regular-Subsetted.ttf NotoSansTamil-Bold.ttf NotoSansTamil-Regular.ttf NotoSansTamilUI-Bold.ttf NotoSansTamilUI-Regular.ttf NotoSansTelugu-Bold.ttf NotoSansTelugu-Regular.ttf NotoSansTeluguUI-Bold.ttf NotoSansTeluguUI-Regular.ttf NotoSansThai-Bold.ttf NotoSansThai-Regular.ttf NotoSansThaiUI-Bold.ttf NotoSansThaiUI-Regular.ttf NotoSerif-Bold.ttf NotoSerif-BoldItalic.ttf NotoSerif-Italic.ttf NotoSerif-Regular.ttf Roboto-Black.ttf Roboto-BlackItalic.ttf Roboto-Bold.ttf Roboto-BoldItalic.ttf Roboto-Italic.ttf Roboto-Light.ttf Roboto-LightItalic.ttf Roboto-Medium.ttf Roboto-MediumItalic.ttf Roboto-Regular.ttf Roboto-Thin.ttf Roboto-ThinItalic.ttf RobotoCondensed-Bold.ttf RobotoCondensed-BoldItalic.ttf RobotoCondensed-Italic.ttf RobotoCondensed-Light.ttf RobotoCondensed-LightItalic.ttf RobotoCondensed-Regular.ttf At the second device I have the same list of fonts. Also I have Ubuntu mono font, which includes all border symbols and I can replace any font from this list by Ubuntu Mono. I already tried to replace NotoSansSymbols-Regular-Subsetted.ttf and few Roboto and NotoSans fonts, but it not helps. Can anybody give me advice, what fonts I should replace, please?

alive-corpse commented 7 years ago

By the way: Device with Android 6.0.1 has exactly the same problem.

hyc commented 7 years ago

The corners aren't broken any more on Android 7.0, but horizontal alignment is still wrong. Still not fixed width.

nath1as commented 5 years ago

This is still an issue at least with whitespace characters.

hyc commented 5 years ago

Still an issue on Android 8.

davelab6 commented 3 years ago

@moyogo is this something we can fix in lgc?

moyogo commented 3 years ago

@davelab6 Yes. The vertical gaps between lines of box drawing glyphs is caused by a couple of issues:

  1. The vertical size of the box drawing glyphs shorter than the vertical metrics. The box drawing glyphs extend between 979 and -246 while the vertical metrics extend from 1069 and -293.
  2. The bounding box of the font is larger than the vertical metrics. The font yMax, yMin are 1229 and -389.

We can adjust the box drawing glyphs to match the vertical metrics but, if I understand correctly, Android will use the font bounding box instead of the vertical metrics so there will still be gaps between lines. The glyphs that are larger than the vertical metrics are mostly Latin accented letters with stacked diacritics, for example Vietnamese accented letters. They can be modified to match the design of Noto Sans where they take less vertical space.

I'll work on both.

SKing-2003 commented 2 years ago

This is no longer a bug, as Noto Sans Mono exists for such uses.

hyc commented 2 years ago

Nice to know. Any chance of providing an apk that can install these fonts on older Android versions?

simoncozens commented 1 year ago

Any chance of providing an apk that can install these fonts on older Android versions?

I wouldn't know how to do that, to be honest - there doesn't seem to be an easy way to install fonts on Android, as far as I can Google. Third-party distributions of Noto fonts are... well, a third-party thing. If someone knows how to package these fonts as an Android-installable APK, then please feel free.

This is no longer a bug, as Noto Sans Mono exists for such uses.

Indeed; closing.