Bug 102780 - FILEOPEN: Hebrew characters in EMF renders as other symbols
Summary: FILEOPEN: Hebrew characters in EMF renders as other symbols
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:emf
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2016-09-29 02:07 UTC by Ofir
Modified: 2024-09-29 11:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF with Hebrew characters (2.80 KB, image/x-emf)
2016-09-29 02:07 UTC, Ofir
Details
PDF exported from PowerPoint 2013 showing expected result (122.94 KB, application/pdf)
2016-09-29 02:08 UTC, Ofir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ofir 2016-09-29 02:07:12 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Build Identifier: Build ID: 1:5.2.1~rc2-0ubuntu1~xenial0

The attached EMF file has two lines of text. The First line with English characters renders correctly while the second line with Hebrew renders with wrong symbols. The second line should show:
אבגד
The attached PDF exported from PowerPoint show the expected result.

I've used PowerPoint 2013 to create the EMF. Started a blank presentation, created two text boxes and saved as Enhanced Windows Metafile.

Reproducible: Always

Steps to Reproduce:
1. Open the EMF file with Draw or drag it to Impress
Actual Results:  
Render Hebrew characters:
אבגד

Expected Results:  
Non Hebrew characters




Reset User Profile?Yes
Comment 1 Ofir 2016-09-29 02:07:59 UTC
Created attachment 127712 [details]
EMF with Hebrew characters
Comment 2 Ofir 2016-09-29 02:08:38 UTC
Created attachment 127713 [details]
PDF exported from PowerPoint 2013 showing expected result
Comment 3 Buovjaga 2016-10-12 12:08:49 UTC
Repro with both inserting and opening.

Win 7 Pro 64-bit Version: 5.3.0.0.alpha0+
Build ID: e2f6c7f0d0cc14f851d7028ff846c5dc658a81c6
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-10_23:08:02
Locale: fi-FI (fi_FI); Calc: group

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 4 Ofir 2017-11-10 00:44:59 UTC
Still reproducible with LO 6.0.0.0.alpha1.
Comment 5 QA Administrators 2018-11-11 03:46:33 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2018-11-11 15:44:01 UTC
still repro in

Version: 6.2.0.0.alpha1+ (x64)
Build ID: 0b2d153f58c83fb289c96b348631e44e553b1a9a
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2018-11-02_21:11:48
Locale: ru-RU (ru_RU); Calc: threaded
Comment 7 Valek Filippov 2021-05-25 20:51:44 UTC
ExtTextOutW record with Aleph/Bet/Gimel/Dalet has ETO_GLYPH_INDEX set.

As per [MS-EMF] spec:
"This bit indicates that the codes for characters in an output text string are indexes of the character glyphs in a TrueType font.
Glyph indexes are font-specific, so to display the correct characters on playback,
the font that is used MUST be identical to the font used to generate the indexes."

That could be probably supported by using HarfBuzz' hb_font_glyph_to_string() or FreeType's FT_Get_Glyph_Name() to "convert encoding".

(Kudos to Behdad for pointing to the right APIs).
Comment 8 QA Administrators 2023-05-26 03:17:50 UTC Comment hidden (hide, obsolete)
Comment 9 Jiří Nováček 2024-09-29 11:39:43 UTC
Reproduced just by opening the EMF file. I am not sure if the comment below corresponds to testing or fixing the problem.

Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: 905e7c1105536c9757fa2c2faf670738aab02595
CPU threads: 8; OS: macOS 15.0; UI render: Skia/Metal; VCL: osx
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

> ExtTextOutW record with Aleph/Bet/Gimel/Dalet has ETO_GLYPH_INDEX set.
> 
> As per [MS-EMF] spec:
> "This bit indicates that the codes for characters in an output text string
> are indexes of the character glyphs in a TrueType font.
> Glyph indexes are font-specific, so to display the correct characters on
> playback,
> the font that is used MUST be identical to the font used to generate the
> indexes."
> 
> That could be probably supported by using HarfBuzz'
> hb_font_glyph_to_string() or FreeType's FT_Get_Glyph_Name() to "convert
> encoding".
> 
> (Kudos to Behdad for pointing to the right APIs).