Bug 103596 - Support OpenType variable font (OTVF) based text layout
Summary: Support OpenType variable font (OTVF) based text layout
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL: https://www.microsoft.com/en-us/Typog...
Whiteboard: inReleaseNotes:7.5
Keywords:
: 150579 (view as bug list)
Depends on: HarfBuzz
Blocks: Font-Rendering 118792
  Show dependency treegraph
 
Reported: 2016-10-31 05:38 UTC by Volga
Modified: 2024-06-29 18:08 UTC (History)
24 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (129.25 KB, application/x-zip-compressed)
2019-08-25 17:07 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2016-10-31 05:38:01 UTC
Description:
Recently OpenType specification introduced Font Variation in version 1.8, as the specification, this technology allow a font designer to incorporate multiple font faces within a font family into a single font resource.

Steps to Reproduce:
To make specific font variation available, some of operations such as Bold and Italic need to handle OT Font Variation mechanism.

Actual Results:  
If LibreOffice get this support, any documents opened/saved with LibreOffice could also use OT Variation based text layout.

Expected Results:
If LibreOffice get support for this technology, it would get predictable appearences when using fonts that use OT Font Variation mechanism, and getting great flexibility for content authors and designers while also allowing the font data to be represented in an efficient format.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Android 4.3; Mobile; rv:49.0) Gecko/49.0 Firefox/49.0
Comment 1 Buovjaga 2016-11-29 10:47:33 UTC
Sounds useful -> NEW
Comment 2 Volga 2016-12-01 07:31:02 UTC
On this article you will see the advantages of using OpenType Font Variations in the document if you can read Chinese:
http://www.typeisbeautiful.com/2016/09/10968/zh-hant/
Comment 3 Volga 2016-12-22 07:59:40 UTC
Microsoft has docoments related to OpenType Font Variation
https://www.microsoft.com/typography/otspec/otvaroverview.htm
Comment 4 Volga 2017-01-05 15:53:14 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2017-01-05 16:04:49 UTC
(In reply to Volga from comment #4)
> HarfBuzz developer announced version 1.4.0 is released, which started
> providing APIs for font variations, so we can try to implement font
> variation based on this, but we can also try newer version to get enhanced
> support.

Yep, it's just a question of what Linux distributions we target.. the HarfBuzz version can't be too new :)
Comment 6 Volga 2017-01-06 06:54:15 UTC
(In reply to Volga from comment #4)
> HarfBuzz developer announced version 1.4.0 is released, which started
> providing APIs for font variations, so we can try to implement font
> variation based on this, but we can also try newer version to get enhanced
> support.

Recently HB 1.4.1 is released, which improved build configuration to gef better performance when building with Unicode data, so I suggest intergrate HB 1.4.1 or newer.
Comment 7 Volga 2017-02-02 16:13:17 UTC
(In reply to Buovjaga from comment #5)
> Yep, it's just a question of what Linux distributions we target.. the
> HarfBuzz version can't be too new :)
Don’t worry, HarfBuzz will get complete support for OT Variations in the future, this time will not later than LO 5.4.0 alpha1 stage. You’ll feel free to enjoy it and make sure no problem before 5.4.0 is released.
Comment 8 Volga 2017-03-07 00:29:38 UTC
Monotype provided two variable fonts for test purpose
https://github.com/Monotype/Monotype_prototype_variable_fonts/
Comment 10 Volga 2017-04-17 07:18:22 UTC Comment hidden (obsolete)
Comment 11 Volga 2017-06-12 05:18:28 UTC
We can try to make font name, font weight and font style works with 'stat' table, for font size, we can try to handle 'opsz' tag of the 'fvar' table to make sized based variation works.
Comment 12 Volga 2017-06-12 05:36:56 UTC
Google Noto Variable fonts moved here:
https://github.com/googlei18n/noto-fonts-alpha/tree/master/from-pipeline/unhinted/variable-ttf
Comment 13 Volga 2017-08-15 13:11:58 UTC
Bug 109142 have been fixed recently, which bring us HarfBuzz 1.4.8 with OpenType Font Variation support, so we can started to working for this.
Comment 14 Volga 2017-12-26 18:09:07 UTC
Windows 10 Fall Creators Update bundled a variable font "Bahnschrift".
https://blogs.windows.com/windowsexperience/2017/08/23/announcing-windows-10-insider-preview-build-16273-pc/
https://venturebeat.com/2017/08/23/microsoft-releases-new-windows-10-preview-with-shell-edge-and-input-improvements/

This font having 5 weights produced via font variation, and they works on screen, but failed for printing and PDF expert. See bug 108497.
Comment 15 Yousuf Philips (jay) (retired) 2018-01-30 21:56:42 UTC
*** Bug 114855 has been marked as a duplicate of this bug. ***
Comment 16 Volga 2019-08-25 11:54:16 UTC Comment hidden (obsolete)
Comment 17 Buovjaga 2019-08-25 13:30:37 UTC
(In reply to Volga from comment #16)
> Do you started working for this? I’ve discovered the following commit:
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=cb54bb89494218589227246f1923d8a24ab1676a
> 
> rhbz#1690732 basic font variation support
> 
> I’ll see whether this is works on Windows.

Based on the changes files, I doubt it works on Windows
Comment 18 Volga 2019-08-25 16:58:17 UTC
(In reply to Volga from comment #16)
> Do you started working for this? I’ve discovered the following commit:
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=cb54bb89494218589227246f1923d8a24ab1676a
> 
> rhbz#1690732 basic font variation support
> 
> I’ll see whether this is works on Windows.
OK, I tested on Windows again, reproduced with:
版本: 6.3.0.4 (x64)
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU 线程: 4; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: CL

With Bahnschrift font family I saw the glyphs looks as expected, but LibreOffice failed to handle advance width for condensed and semi-condensed fonts, and failed to expert into PDF.
Comment 19 Volga 2019-08-25 17:07:11 UTC
Created attachment 153643 [details]
Test file

Here is an archive of test files, this archive includes:
Bahnschrift test.odt - File used for test.
Bahnschrift test.pdf - File experted directly with LiberOffice.
Bahnschrift test-1.pdf - File "printed" with PDFCreator with instrustions in bug 108497, comment 20.
Comment 20 V Stuart Foote 2021-07-28 14:26:07 UTC
*** Bug 140538 has been marked as a duplicate of this bug. ***
Comment 21 V Stuart Foote 2021-07-28 14:26:21 UTC
*** Bug 137301 has been marked as a duplicate of this bug. ***
Comment 22 V Stuart Foote 2021-07-28 14:30:31 UTC
*** Bug 141726 has been marked as a duplicate of this bug. ***
Comment 23 V Stuart Foote 2021-07-28 14:31:54 UTC
*** Bug 140710 has been marked as a duplicate of this bug. ***
Comment 24 Timur 2022-03-08 08:02:29 UTC
*** Bug 147824 has been marked as a duplicate of this bug. ***
Comment 25 V Stuart Foote 2022-07-01 13:34:03 UTC
*** Bug 130149 has been marked as a duplicate of this bug. ***
Comment 26 V Stuart Foote 2022-07-01 13:35:54 UTC
*** Bug 145306 has been marked as a duplicate of this bug. ***
Comment 27 V Stuart Foote 2022-07-01 13:36:33 UTC
*** Bug 146355 has been marked as a duplicate of this bug. ***
Comment 28 Volga 2022-07-05 19:21:53 UTC
I think this should not just to support variable fonts. While a variable font is used, LibreOffice need to provide more options to let users adjust variable axis as whatever they want, at least in the Character dialog.
Comment 29 Buovjaga 2022-07-06 08:35:48 UTC
*** Bug 149879 has been marked as a duplicate of this bug. ***
Comment 30 Timur 2022-08-25 07:02:35 UTC
*** Bug 150579 has been marked as a duplicate of this bug. ***
Comment 31 Volga 2022-11-24 04:51:48 UTC
Now it's necessary to add some options to tweak variation axis.
Comment 32 ⁨خالد حسني⁩ 2022-11-24 06:22:01 UTC
This should be fixed now. We support variable fonts and apply variations to text metrics and layout features properly. Support is currently limited to named instances, to support arbitrary font variations, we will need both UI support as well as file format support, so this should be tracked separately.
Comment 33 Volga 2022-11-25 04:44:10 UTC
(In reply to خالد حسني from comment #32)
> This should be fixed now. We support variable fonts and apply variations to
> text metrics and layout features properly. Support is currently limited to
> named instances, to support arbitrary font variations, we will need both UI
> support as well as file format support, so this should be tracked separately.

OK, go to bug 152206.