Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back to alternative fonts when characters are not available in Dr #265

Open
andymatuschak opened this issue Apr 19, 2022 · 2 comments
Labels
🚩 Help wanted Particularly amenable/appropriate for contributors 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups)

Comments

@andymatuschak
Copy link
Owner

andymatuschak commented Apr 19, 2022

Dr does not include Chinese characters (or extended character sets associated with many other languages). We should fall back reasonably in this case, e.g. font-family: Dr, Futura, sans-serif

@andymatuschak andymatuschak changed the title Fall back to alternative fonts for other Fall back to alternative fonts when characters are not available in Dr Apr 19, 2022
@L-M-Sherlock
Copy link

Now I know the visual problem in Orbit if I use it with Chinese text. The line spacing is too narrow for most Chinese:

image

For example, you can see the Chinese documents on apple.com: 用于 Mac 的Pages: 在 Pages 文稿中设定行间距和段落间距

image

Line height between 1.5 to 2.0em would be more legible than the current.

@andymatuschak
Copy link
Owner Author

Aha, thanks for explaining. Yes, I see: the Chinese characters occupy the full ascender and descender bounding box. This is apparently a common problem, and difficult to handle correctly. https://stackoverflow.com/questions/28947430/is-line-height-determined-by-the-first-font-in-a-css-font-stack

Probably the most natural way to fix this would be to add a Markdown parsing stage which emits special <span>s for affected characters when they're encountered. Hm…

@andymatuschak andymatuschak added 🚩 Help wanted Particularly amenable/appropriate for contributors 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups) labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚩 Help wanted Particularly amenable/appropriate for contributors 🗂 Polish Type: Polish opportunity (rough visual edges, perf hiccups)
Projects
None yet
Development

No branches or pull requests

2 participants