Text in SVG displayed with a wrong Arial font

Bug #1612945 reported by Nutchanon Wetchasit
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Medium
Unassigned

Bug Description

While I was illustrating some figure for use with DocBook document, I ran
into an odd problem in Inkscape's font family resolution:

- My PC has several variants of Arial font installed:
   - Arial
   - Arial Black
   - Arial Narrow

- When I loaded an SVG file with text that uses "Arial" font with regular
  style (not bold, not italic), Inkscape will use "Arial Black" font to
  display it; which is incorrect, and produces excessively bold output.

  If the text used bold font weight and/or italic style, a correct font
  will be displayed.

This affects the new Inkscape 0.91, but *not* the old Inkscape 0.48.2
installed on the same machine. The problem might be more common on
Microsoft Windows, as there're multiple Arial font variants automatically
installed with the OS and Microsoft Office suite.

Attached test files follows:

- arial.svg: A hand-crafted test SVG file displaying four lines
                          of text using "font-family:'Arial'" with different
                          weight and styles:
                              Arial
                              Arial Bold
                              Arial Italic
                              Arial Bold Italic

- arial-batik1.7.png: A reference rendering from Apache Batik 1.7.
                          You'd see that different font styles are displayed
                          in expected fashion.

- arial-inkscape0.48.png: A rendering from Inkscape 0.48.2.
                          You'd see that result is virtually identical
                          to Apache Batik.

- arial-inkscape0.91.png: A rendering from Inkscape 0.91.
                          You'd see that normal "Arial" text is displayed
                          bolder than "Arial Bold"; due to Inkscape using
                          "Arial Black" font instead of plain "Arial".

This might be indirectly related to a long-running bug #165521.
Though this bug entry mainly concerns rendering of an existing SVG file,
rather than Inkscape's font selection combobox.

Inkscape: 0.91 portable 32-bit
Inkscape: 0.48.2 r9819 32-bit
Batik: 1.7 (binary)
System: Microsoft Windows XP Professional SP3

P.S.:
This is how Windows program (e.g. Notepad) lists Arial fonts on my system:

- Arial (Regular/Italic/Bold/Bold Italic)
- Arial Black (Regular/Italic/Bold/Bold Italic)
- Arial Narrow (Regular/Italic/Bold/Bold Italic)

This is how Windows' Fonts folder lists Arial fonts on my system:

- Arial (TrueType)
- Arial Black (TrueType)
- Arial Bold (TrueType)
- Arial Bold Italic (TrueType)
- Arial Italic (TrueType)
- Arial Narrow (TrueType)
- Arial Narrow Bold (TrueType)
- Arial Narrow Bold Italic (TrueType)
- Arial Narrow Italic (TrueType)

Tags: fonts
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Windows XP (32-bit), Inkscape 0.48.5, 0.91 and 0.92.x rev. 15044.
The first arial text looks good with all the Inkscape versions.

Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

Since this problem seems not to be easily reproducible, I have attached
my fontconfig cache directory (from `Data\Temp` in my Inkscape 0.91 portable)
as `fontconfig-cache.zip` in case it could help diagnosing how fonts
got mixed up.

Note: Fontconfig cache file found in portable Inkscape 0.91 directory
and the user-wide one found in "%USERPROFILE%\Local Settings\Temp" directory
are byte-for-byte identical.

Inkscape: 0.91 r13725 portable 32-bit
Inkscape: 0.48.2 r9819 32-bit
System: Microsoft Windows XP Professional SP3

Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

Font selector combobox screenshot from each version of Inkscape are also
attached as `fontsel-inkscape0.48.png` and `fontsel-inkscape0.91.png`.
You'd see that in the 0.91 screenshot, `Arial` fonts are combined into
a single entry; similar to aforementioned bug #165521.

Inkscape: 0.91 r13725 portable 32-bit
Inkscape: 0.48.2 r9819 32-bit
System: Microsoft Windows XP Professional SP3

Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :
Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

This is still reproducible under current Inkscape 0.92.1 on the same machine.
Rendering result of `arial.svg` is attached as `arial-inkscape0.92.1.png`.

Inkscape: 0.92.1 (r15371) portable 32-bit
System: Microsoft Windows XP Professional SP3

Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

The attached `fontsel-inkscape0.92.1.png` screenshot shows that this probles
is still likely related to the previously-mentioned bug #165521.

Inkscape: 0.92.1 (r15371) portable 32-bit
System: Microsoft Windows XP Professional SP3

Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

The attached `fontconfig-cache_inkscape0.92.1.zip` contains fontconfig cache from Inkscape 0.92.1 Portable's `Data\settings\AppData\Local` directory.

Since Inscape didn't ship with fontconfig utilities, which fontconfig version that Inkscape 0.92.1 (Win32-portable) is using? And where I can find instruction of how to compile it with the same configuration as one shipped with Inkscape 0.92.1?

Inkscape: 0.92.1 (r15371) portable 32-bit
System: Microsoft Windows XP Professional SP3

Revision history for this message
jazzynico (jazzynico) wrote :

The 32-bit devlibs use fontconfig-2.8.0-2.

And unfortunately I still can't reproduce the issue on Windows XP (32-bit) with 0.92 and lp:inkscape/0.92.x rev. 15414.
The only difference with you is that I installed a 7z archive, and not a portable-apps version.

Revision history for this message
jazzynico (jazzynico) wrote :

Well, I just tested with 0.92.1 portable, and the Arial text shows correctly.

Revision history for this message
Nutchanon Wetchasit (nutchanon-wetchasit) wrote :

@jazzynico:
This problem is likely dependent on combinations of fonts installed on user's machine. Which and how many Arial sub-families font were available on the machine you tested?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.