Bug 125422 - Diacritic ligatures aren't rendered.
Summary: Diacritic ligatures aren't rendered.
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2019-05-21 14:13 UTC by Zeidra Senester
Modified: 2019-06-03 12:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
What happens VS what is supposed to happen (22.28 KB, image/png)
2019-05-21 14:20 UTC, Zeidra Senester
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zeidra Senester 2019-05-21 14:13:46 UTC
Description:
In my font, I have diacritic ligatures that renders the sequence of combining diacritics differently depending on the order. For example, e + cedilla + circumflex is rendered as ȩ̂, while e + circumflex + cedilla is rendered as ể.
That might just seems like a fancy feature, but it's actually highly useful in my linguistics work.
It works everywhere, including in MS Word, but not in LibreOffice Writer, no matter the settings I've tried. Moreover, all other ligatures works perfectly. Only the diacritics ones don't.
Moreover, that very exemple (ȩ̂) renders with a weird kerning, the circumflex gets slightly displaced on the left when the cedilla is added either before or after, while it renders properly without it. It looks like a bad interaction between the diacritics (that, I insist, only happens in Libreoffice, that's not due to my font).

Steps to Reproduce:
1. Have a font with diacritics ligatures.
2. Type the right combination in the right order.
3. Be disappointed.

Actual Results:
No matter the order, the combination is rendered as if the ligature didn't exist. Plus, with bad kerning that doesn't happen with the diacritics individually.

Expected Results:
Depending on the order, the diacritics should render differently.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Zeidra Senester 2019-05-21 14:20:22 UTC
Created attachment 151564 [details]
What happens VS what is supposed to happen
Comment 2 Dieter 2019-06-01 15:41:32 UTC
Zeidra, thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. Thank you.
Comment 3 V Stuart Foote 2019-06-01 21:22:42 UTC
Hmm, but then these are no Unicode defined diacritic ligatures are there? 

Position of the combining glyph is defined by the font--but in general a combining cedilla (0x0327 - COMBINING CEDILLA) should always be below--while a combining circumflex (0x0302 - COMBINING CIRCUMFLEX ACCENT  ) should be above the target glyph positioned as designed for the grapheme in the font. IMHO LibreOffice handles this exactly correct.

Instead believe you need to select Unicode point for the correct combining glyph for the layout you need--perhaps COMBINING LATIN SMALL LETTER CEDILLA (0x1dd7) 

Try this:  U+0065U+0302U+1DD7 with <alt>+X toggle
or the other stacking order U+0065U+1DD7U+0302

Alternate forms/positioning could be supported (Graphite or OpenFont type) but the font must support it--and the feature code set for the Character property.

Visual appeal of simple stacking of combining digraph will depend on font.

Likewise the "kerning" you note, is a font issue--try a correctly designed font like Noto Sans or Noto Serif for correct positioning of the combining diacritics.

IMHO => NAB
Comment 4 Zeidra Senester 2019-06-01 21:38:15 UTC
No offense to you, V Stuart Foote (though you're offensing me), but I designated that font, and it renders perfectly EVERYWHERE else, so don't put the software's problems on my work.
As for the cedilla, it's a stylistic variation. It's a very basic feature in OpenType, as it's the way contextual glyphs (as in arabic) renders. The path is the same, the one you mentionned, but the glyph is different due to the ccmp feature being activated.
As for the kerning, it only happens when BOTH diacritics are put together. My font has no rule about interactions between lower and upper diacritics kerning at all, and once again it only happens in LibreOffice.
Call that what you want. A bug, a lack of a basic feature… Fact is the problem is there.

Dieter Praas I'd like to, but the problem is linked to a non-standard feature of a proprietary font. I might check how it works with a partially embedded font, TBH I never tried this except for PDF.
Comment 5 V Stuart Foote 2019-06-01 21:58:23 UTC
(In reply to Zeidra Senester from comment #4)
>...
> As for the cedilla, it's a stylistic variation. It's a very basic feature in
> OpenType, as it's the way contextual glyphs (as in arabic) renders. The path
> is the same, the one you mentionned, but the glyph is different due to the
> ccmp feature being activated.
>...

So then activate the 'ccmp' OpenType feature for your font?

Select the text of the Paragraph. Then from standard menu Format -> Character.  Opentype features correctly implemented will be presented via the "Features" tab.  

Can also reach it via the Context menu, or from the Standard toolbar's Font droplist--appending ":ccmp" to your font name.
Comment 6 ⁨خالد حسني⁩ 2019-06-03 11:56:25 UTC
(In reply to Zeidra Senester from comment #0)
> Description:
> In my font, I have diacritic ligatures that renders the sequence of
> combining diacritics differently depending on the order. For example, e +
> cedilla + circumflex is rendered as ȩ̂, while e + circumflex + cedilla is
> rendered as ể.

Both of these sequences are canonically equivalent by Unicode and should be rendered the same by complaint renderrer (which is what LibreOffice layout engine, HarfBuzz, is doing here). The order of the marks in the input is irrelevant since Unicode specifies has the marks are ordered (https://unicode.org/reports/tr15/#Canon_Compat_Equivalence).

If you want to prevent the equivalence and force a specific order, then insert U+034F COMBINING GRAPHEME JOINER or U+200C ZERO WIDTH NON-JOINER control characters between the marks.
Comment 7 ⁨خالد حسني⁩ 2019-06-03 12:11:59 UTC
(In reply to V Stuart Foote from comment #5)
> (In reply to Zeidra Senester from comment #4)
> >...
> > As for the cedilla, it's a stylistic variation. It's a very basic feature in
> > OpenType, as it's the way contextual glyphs (as in arabic) renders. The path
> > is the same, the one you mentionned, but the glyph is different due to the
> > ccmp feature being activated.
> >...
> 
> So then activate the 'ccmp' OpenType feature for your font?
> 
> Select the text of the Paragraph. Then from standard menu Format ->
> Character.  Opentype features correctly implemented will be presented via
> the "Features" tab.  
> 
> Can also reach it via the Context menu, or from the Standard toolbar's Font
> droplist--appending ":ccmp" to your font name.

ccmp is on by default, there is no need to turn it on manually.
Comment 8 ⁨خالد حسني⁩ 2019-06-03 12:14:24 UTC
(In reply to Zeidra Senester from comment #0)
> Moreover, that very exemple (ȩ̂) renders with a weird kerning, the
> circumflex gets slightly displaced on the left when the cedilla is added
> either before or after, while it renders properly without it. It looks like
> a bad interaction between the diacritics (that, I insist, only happens in
> Libreoffice, that's not due to my font).

This could be a font bug, the font might have mark anchors on the e glyph but not e with cedilla glyph, but one would need the actual font file to see this. Since it is only you who have access to the said font, you will have to debug it yourself. Sorry.