Bug 151121 - Need ability to determine which fallback font is used
Summary: Need ability to determine which fallback font is used
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Substitution
  Show dependency treegraph
 
Reported: 2022-09-22 09:56 UTC by Eyal Rozenberg
Modified: 2022-12-06 15:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-09-22 09:56:18 UTC
On Linux and with gtk3 (but probably also in other scenarios), when the font you chose doesn't have the appropriate glyphs for the language you're writing, a fallback font is typically used.

I want to know, both in the font selection dialog and later in the laid-out text, which fallback font(s) are used. It would also help if the indication marked

I don't have a good suggestion of the top of my head of how this information should be made available, but it should.
Comment 1 Rafael Lima 2022-09-22 12:37:11 UTC
Isn't this a dupe of bug 61134?
Comment 2 Heiko Tietze 2022-09-22 12:59:59 UTC

*** This bug has been marked as a duplicate of bug 61134 ***
Comment 3 Eyal Rozenberg 2022-09-22 15:04:36 UTC
No, this has nothing to do with font substitutions. This is relevant even when the user has not applied any font substitutions.
Comment 4 Telesto 2022-09-22 15:30:47 UTC
(In reply to Eyal Rozenberg from comment #0)
> On Linux and with gtk3 (but probably also in other scenarios), when the font
> you chose doesn't have the appropriate glyphs for the language you're
> writing, a fallback font is typically used.
> 
> I want to know, both in the font selection dialog and later in the laid-out
> text, which fallback font(s) are used. 

The font substitution is black box indeed. 

> It would also help if the indication marked
I have no clue what you tend to to say...

> I don't have a good suggestion of the top of my head of how this information
> should be made available, but it should.

At minimum in the Style Inspector, I guess
Comment 5 Caolán McNamara 2022-09-22 15:47:43 UTC
FWIW there are two levels of substitution.

Simple font substitution when the font isn't present at all which the top layers sort of know about enough already to indicate with the fontname shown in italic in the fontname boxes.

And glyph substitution where the font existed, but a glyph in it didn't. Higher levels know pretty much nothing about glyph substitution and some of the substitutions (driven by fontconfig) can be stuff like the bold variant doesn't have the glyph but the regular one does so the glyph sub is the regular version with fake "emboldening" applied to it.

bubbling up the info for a) probably isn't too hard, e.g. as tooltip info in fontbox, b) is probably a PITA to achieve.
Comment 6 Timur 2022-09-23 09:59:48 UTC
Reopened is wrong status, do not set. 
https://bugs.documentfoundation.org/page.cgi?id=fields.html#bug_status
Comment 7 Eyal Rozenberg 2022-09-23 10:26:53 UTC
(In reply to Timur from comment #6)
> Reopened is wrong status, do not set. 

Fair enough, but the link you gave doesn't say when "REOPENED" applies.


(In reply to Caolán McNamara from comment #5)
> FWIW there are two levels of substitution.

So, actually, I think you're describing three levels:

1. Font is missing altogether
2. Specific glyph is missing altogether (i.e. all variants)
3. Variant of glyph is missing (e.g. bold vs non-bold, italic vs roman)

and I might add another level 1.5" between (1.) and (2.), which would be an entire block on the Unicode plane missing (block e.g. in the sense of the Insert Special Character dialog).

My interest is mostly levels 1.5 and 2. , and to a lesser extent level 3. I, and I believe many users, need to know which font (family) is _actually_ used to render their text, or their text in a certain language:

1. To prevent cases of different rendering on another system due to  different fallbacks.
2. To be able to choose between font families for their text - rather than making the choice with the different options mis-represented: You think you've chosen font Foo but it's actually font Bar; then you continue down and notice that Baz seems to remind you of Foo a lot, but you don't know if it's because they're actually similar, or because they both fall bar to Bar.

Now, you said the "higher levels" aren't aware of this. But - we can definitely see which glyphs are available in which font, using the Insert Special Character dialog. Doesn't that mean that we _do_ have this visibility?
Comment 8 Eyal Rozenberg 2022-09-23 13:27:01 UTC
Adding a related bug regarding the font selection dialog - where the inability to tell whether a fallback font is used and which makes it difficult to select a font for writing in the language you're interested in.
Comment 9 Heiko Tietze 2022-11-22 12:12:52 UTC
As for the UI I would still recommend to use the same feedback mechanism for all kind of fallback.