Opened 5 years ago
Closed 4 years ago
#16212 closed bug (fixed)
Some Japanese text style missing in Webpositive
Reported by: | mt | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | Servers/app_server | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Attachments (4)
Change History (20)
by , 5 years ago
Attachment: | hrev54299.png added |
---|
comment:1 by , 5 years ago
I'm working on this, underlying issue is that noto sans bold fallback does not fall back to the correct style and instead falls back to style 0, which appears to be noto sans cjk thin in this case
by , 5 years ago
Attachment: | hrev54302+patch.png added |
---|
Webpositive opening Japanese version of "Welcome to Haiku!" in hrev54302 + patch.
comment:4 by , 5 years ago
The patch makes it fall back to Noto Sans CJK Regular instead of Noto Sans CJK Thin now, it's not the complete solution though, ideally it should fall back to Noto Sans CJK Bold instead :)
by , 5 years ago
Attachment: | 0003-Fontfallback-Add-Bold-style-check.patch added |
---|
follow-up: 10 comment:6 by , 5 years ago
fontStyle = font.Style(); is the iteration that should set bold already if bold is set before, you can see that the fallback works for Noto Sans Display Bold in stylededit for example, does your patch make it work for Noto Sans Bold? (there would be other styles to check aswell)
follow-up: 11 comment:7 by , 5 years ago
Looks like this patch makes bold -> bold and bold italic -> bold work
comment:8 by , 5 years ago
The "face" flag can be passed through to the fallback glyph selector, I believe, and perhaps this should be done as part of iterating.
comment:9 by , 5 years ago
It looks like face and Style serve a similar purpose, what is the difference between them? I suppose we should use one or the other
comment:10 by , 5 years ago
Replying to nephele:
fontStyle = font.Style(); is the iteration that should set bold already if bold is set before, you can see that the fallback works for Noto Sans Display Bold in stylededit for example, does your patch make it work for Noto Sans Bold? (there would be other styles to check aswell)
I think we need check what font.Style() returns. If font.Style() returns simply "Bold", we could fallback "Noto Sans CJK JP Bold" already.
comment:11 by , 5 years ago
Replying to nephele:
Looks like this patch makes bold -> bold and bold italic -> bold work
edit: that patch as is would also set bold as style unconditionally if bold italic is present for fonts that do have bold italic so it's not a perfect solution
Fallback fonts Noto Sans Thai, CJK JP, and Symbol don't have "Italic". So I think we check "Bold" first, but for "Noto Sans display" fallback, we check "Bold Italic" first...
comment:12 by , 5 years ago
I think we need check what font.Style() returns. If font.Style() returns simply "Bold", we could fallback "Noto Sans CJK JP Bold" already.
This already happens, I am just not sure why it does not work if it falls back from Noto sans bold as opposed to noto sans display bold (It might be a simple problem, but i have been really unsucsesfull to get debug output from thsi part of the code :/)
Fallback fonts Noto Sans Thai, CJK JP, and Symbol don't have "Italic". So I think we check "Bold" first, but for "Noto Sans display" fallback, we check "Bold Italic" first...
Problem is that this code should later use any user installed fonts to fallback to aswell, and we can't make many assumptions about which styles are available or not
I think the best way is to
- match style
- match style, strip italic part of style
- try "Regular" style
- try any style
the code currently does 1. and 4., with 1. not working correctly always (and 3. beeing the patch on gerrit)
comment:13 by , 5 years ago
I add Italic and Bold Italic support and stripping Italic from Noto Sans Thai, CJK JP, and Symbol.
comment:14 by , 5 years ago
This does work on haiku master somewhat, fallback is broken for thin italic though, and likely other *thin variants aswell, surely there is a better aproach to strip italic that does not require a hardcoded has italics list?
I should investiage more whether i can't get noto sans bold to fallback normally in the first iteration :)
comment:16 by , 4 years ago
Milestone: | Unscheduled → R1/beta3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Webpositive opening Japanese version of "Welcome to Haiku!" in hrev54299.