Inkscape font: Courier -> Sans (Windows)

Bug #1429793 reported by jazzynico
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Patrick Storz

Bug Description

Follow-up to:
Bug #408653 "Inkscape font: Courier -> Sans" and
Bug #1002757 "Regressions with new default font 'sans-serif' (r11393)"

From Bug #1002757, comment #16:
-----
Today I opened a file where Inkscape reports a "Courier" font. And the 0.48 release used then a courier font.
But 0.91 displays a sans-serif font where it should display a serif font.
-----

To reproduce, just type some text in a blank new Inkscape document and apply the Courier font. The Text and font dialog shows a correct Courier preview, but the text stays with a sans-serif font on canvas.

Reproduced on Windows XP, Inkscape trunk rev. 13979 and 0.91.
Not reproduced with 0.48.5.

Revision history for this message
jazzynico (jazzynico) wrote :
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.92
Revision history for this message
André S. (anschitech) wrote :

Is this project still alive? the last release was over a year ago, and no minor (bug fix) releases were done since.
There are no update anywhere about the progress of this project.

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows 7 with Inkscape trunk 14630 and the win32 devlibs51 branch, with all text and font related packages (Pango, Fontconfig, Freetype, Harfbuzz) updated. Very likely a bug in Inkscape and not in the dependencies.

Revision history for this message
André S. (anschitech) wrote :

Today I was able to reproduce the same behaviour on 92pre3.
I imported an pdf in 48.5 where the font is identified and displayed correctly.
Then I imported the same pdf with the internal pdf library in 92pre3 where it seemed to identify the font as "courier" but nonetheless displayed it in a sans serif font and also messed up the display of the text.
See attached image. (I'm not able to provide the PDF itself, since it contains confidential information)

Revision history for this message
André S. (anschitech) wrote :

I played a bit with 92pre3 on Windows.
When I choose "Courier New" the font is displayed as desired.
When choosing "Courier" from the font list, a sans serif font is displayed. (see attachment)
When I export the file to PDF and open it in a PDF reader, the text is also displayed as in Inkscape (sans serif font).
When opening the PDF in a text editor there the wrong font is embedded:

Sample from PDF:
 12 0 obj
 << /Type /FontDescriptor
   /FontName /JDRXLG+DejaVuSans
   /FontFamily (DejaVu Sans)
   /Flags 32
   /FontBBox [ -1020 -415 1680 1166 ]
   /ItalicAngle 0
   /Ascent 928
   /Descent -235
   /CapHeight 1166
   /StemV 80
   /StemH 80
   /FontFile2 8 0 R
 >>
 endobj

But the SVG says Courier:
    <text
       id="text4577"
       y="17"
       x="5"
       style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.64583325px;line-height:6.61458302px;font-family:Courier;-inkscape-font-specification:Courier;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:0px;word-spacing:0px;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker:none;enable-background:accumulate"
       xml:space="preserve"><tspan
         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Courier;-inkscape-font-specification:Courier;text-align:start;text-anchor:start;stroke-width:0.26458332px"
         y="17"
         x="5"
         id="tspan4575"
         sodipodi:role="line">This is text written with &quot;Courier&quot; font.</tspan></text>

Revision history for this message
André S. (anschitech) wrote :

This bug is still present in the 0.92.0 release.

Revision history for this message
jazzynico (jazzynico) wrote :

> This bug is still present in the 0.92.0 release.

Unfortunately yes. Let's hope someone will find a fix for the next major version.

Changed in inkscape:
milestone: 0.92 → 0.93
Revision history for this message
André S. (anschitech) wrote :

For me this is a blocker to move completely to 0.92. Occasionally I need to modify images from an automated tool that generates "Courier" font texts. These are completely rendered useless with this bug. (see https://launchpadlibrarian.net/297184185/IsNoSans_Inkscape92pre3_.png)

Revision history for this message
Patrick Storz (ede123) wrote :

Fixed in master for MSYS2 builds:
https://gitlab.com/inkscape/inkscape/commit/ed9ae2c714aa8e6843b81da19a13bc5917acf69c

Fontconfig will now fall back to "Courier New" when it encounters the font name "Courier".
(this is also the behavior of the rendering mechanism used for the font list and "Text & Font" dialogs which is why those have shown a mono-spaced font - not "Courier" though - before)

Current plan for 0.92.2 is to also distribute an MSYS2 build, so this will also be fixed in 0.92.2 pending acceptance of https://gitlab.com/inkscape/inkscape/merge_requests/52 by the release manager.

Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
status: Triaged → In Progress
milestone: 0.93 → 0.92.2
Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
André S. (anschitech) wrote :

Glad to see progress on this one. Waiting now for 0.92.2 to be released.
Hopefully 0.48.5 can retire soon. :) Still have both installed in parallel.

Revision history for this message
André S. (anschitech) wrote :

Installed the new 0.92.2 today on a new machine. Tested with a previously problematic file. Displays just fine.
Thanks for your effords!

jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
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.