Summary: | line-height: normal may be too small for some fonts | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Alvin Wong <alvin> |
Component: | Tool/Text | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | griffinvalley |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/5f00891204e41a0880dd593bf16b996561c55c1a | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | screenshots |
Looks like Source Han Sans has a similar problem. A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1906 Git commit 2e1bc2bfbd124693d3e7a0848788b670fd730804 by Alvin Wong. Committed on 27/08/2023 at 18:46. Pushed by alvinwong into branch 'master'. text: Also consider HHEA metrics for default line height If USE_TYPO_METRICS is not set, also get the HHEA ascender/descender/lineGap metrics, then compare it with the OS/2 sTypo metrics and choose the larger line height. This fixes certain fonts having a default line height that is too tight (e.g. Microsoft JhengHei, Source Han Sans). M +23 -8 libs/flake/text/KoSvgTextShape_p_layout.cpp https://invent.kde.org/graphics/krita/-/commit/2e1bc2bfbd124693d3e7a0848788b670fd730804 Git commit 5f00891204e41a0880dd593bf16b996561c55c1a by Alvin Wong. Committed on 27/08/2023 at 18:47. Pushed by alvinwong into branch 'krita/5.2'. text: Also consider HHEA metrics for default line height If USE_TYPO_METRICS is not set, also get the HHEA ascender/descender/lineGap metrics, then compare it with the OS/2 sTypo metrics and choose the larger line height. This fixes certain fonts having a default line height that is too tight (e.g. Microsoft JhengHei, Source Han Sans). (cherry picked from commit 2e1bc2bfbd124693d3e7a0848788b670fd730804) M +23 -8 libs/flake/text/KoSvgTextShape_p_layout.cpp https://invent.kde.org/graphics/krita/-/commit/5f00891204e41a0880dd593bf16b996561c55c1a |
Created attachment 160450 [details] screenshots For example, Microsoft JhengHei (built-in Traditiona Chinese font on Windows) looks a bit too tight. FIrefox/Chrome appears to use taller metrics. Font metrics: Win Ascent: 2203 WIn Descent: 521 Typo Ascent: 1823 Typo Descent: -225 Typo Line Gap: 0 HHead Ascent: 2203 HHead Descent: -521 HHead Line Gap: 0 VHead Column Spacing: 0 Capital Height: 1549 X Height: 1106