Download it now!
Bug 121327 - Support multi-colored fonts using CBDT/SBIX tables
Summary: Support multi-colored fonts using CBDT/SBIX tables
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 128387 129906 (view as bug list)
Depends on: HarfBuzz
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2018-11-10 07:12 UTC by Volga
Modified: 2020-01-12 11:25 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2018-11-10 07:12:25 UTC
Description:
This is similar to bug 104403, but for fonts with CBDT/sbix tables instead (https://docs.microsoft.com/zh-cn/typography/opentype/spec/cbdt https://docs.microsoft.com/zh-cn/typography/opentype/spec/sbix). This might be a trickier as instead of rendering layered glyphs with different colors we will need to render raster graphics. We already have decent raster image support, but LibreOffice doesn’t make use of it from a low level as text rendering in VCL. Since HarfBuzz got support in version 2.1.0, it’s possible to render color glyphs via accessing these tables.

Steps to Reproduce:
-

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2019-01-14 18:27:45 UTC
Moving to NEW
Comment 2 V Stuart Foote 2019-10-25 14:23:54 UTC
*** Bug 128387 has been marked as a duplicate of this bug. ***
Comment 3 V Stuart Foote 2020-01-10 14:25:46 UTC
@Khaled, for export to PDF does your c11 from bug 104403 against COLR/CPAL table fonts apply here as well?

"For PDF, we would need to call HarfBuzz to decompose the color glyph layers before writing them to the PDF, should be a couple of days work or so if someone is interested."
Comment 4 V Stuart Foote 2020-01-10 14:28:20 UTC
*** Bug 129906 has been marked as a duplicate of this bug. ***
Comment 5 Khaled Hosny 2020-01-11 18:29:03 UTC
(In reply to V Stuart Foote from comment #3)
> @Khaled, for export to PDF does your c11 from bug 104403 against COLR/CPAL
> table fonts apply here as well?
> 
> "For PDF, we would need to call HarfBuzz to decompose the color glyph layers
> before writing them to the PDF, should be a couple of days work or so if
> someone is interested."

For bitmap format, HarfBuzz can give the PNG and then someone need to figure out how to embed it in the PDF file.
Comment 6 Volga 2020-01-12 11:25:34 UTC
(In reply to Khaled Hosny from comment #5)
> (In reply to V Stuart Foote from comment #3)
> > @Khaled, for export to PDF does your c11 from bug 104403 against COLR/CPAL
> > table fonts apply here as well?
> > 
> > "For PDF, we would need to call HarfBuzz to decompose the color glyph layers
> > before writing them to the PDF, should be a couple of days work or so if
> > someone is interested."
> 
> For bitmap format, HarfBuzz can give the PNG and then someone need to figure
> out how to embed it in the PDF file.
I think there are two keys to do, first, embed exposed raster image at its position within text, second, embed text string info into the raster image.