Tutorials: Fontfaces should be specified abstractly

Bug #438307 reported by Masato HASHIMOTO on 2009-09-28
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
jazzynico
Inkscape-docs
Low
jazzynico

Bug Description

Though fontfaces in tutorials are specified Bitstreams Vera Sans/Serif explicitly, IMHO, they should be specified abstractly (i.e. Sans, Serif or Monospace).

Because if specifying fontfaces abstractly, they will be displayed with appropriate fonts on each system, I think.
Additionally, you know Bitstream Vera doesn't include all language's fonts. So even if Bitstream Vera is installed, texts included fonts unsupported by Bitstream are displayed with mixture fonts. In that case the kerning and spacing don't work properly (in Japanese) though that is not serious problem.

Related branches

tags: added: tutorials
summary: - Tutorials: Fontfaces should be specfied abstractry
+ Tutorials: Fontfaces should be specified abstractly
jazzynico (jazzynico) wrote :

I agree. I've replaced the fonts by generic ones (Sans, Serif) in the Slovak basic tutorial SVG, and I no longer have substitution issues, but incorrect spacing between chapters (on my XP computer, Sans and Serif are a bit smaller than their Bitstream version). I need to test on the tutorial building side to see how it behaves without the Bitstream fonts.

But there may be a good reason why the tutorials are build with these fonts. Does someone know?

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Low
milestone: none → 0.47.1
status: New → Confirmed
jazzynico (jazzynico) on 2010-01-29
Changed in inkscape:
milestone: 0.47.1 → 0.48
status: Confirmed → In Progress
jazzynico (jazzynico) wrote :

I've tried with sans-serif and serif, but sans-serif doesn't work on Windows. It uses a sans font, but italic and bold are not applied...
I'm now going to try with sans, instead of sans-serif. It's not a generic font family, as defined in http://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#generic-font-families, but it seems to work.

The SVG specs say it's possible to use a list of font families, and it would be the best fix for this bug, but it doesn't work with Inkscape (probably not implemented yet).

jazzynico (jazzynico) wrote :

The new xsl template is in the doc trunk, rev. 22659.

Could you please test the attached files before I commit all the tutorials in bzr?
The zip contains the English, Japanese and Slovak versions of the basic tutorial.
I've tested it on Ubuntu (correctly replaced with DejaVu Sans and Serif) and on Windows XP (replaced with Arial and Times New Roman). The XP test gives smaller fonts, which is normal (DejaVu are a bit taller than Arial and TNR).

helix84 (helix84) wrote :

I tested if all characters are displayed and legible in tutorial-basic.sk on WinXP and Inkscape 0.45.1, the only problem is that the font of "Use Ctrl+down arrow to scroll" is still Bistream Vera and doesn't render 1 Slovak character.

I'll test on Ubuntu tomorrow.

Thanks for taking up the work JazzyNico, I appreciate it.

Masato HASHIMOTO (hashimo) wrote :

As for Japanese,

Linux:
Almost OK, San and Serif fonts are chosen properly each.
But there is a problem in IPAfonts[1]. Spacing of its latin characters are too wide (please see attached ipafonts-issue.png). It's known problem in Qt (not common in Gtk). Because this isn't tutorial's problem, I'll report this as another bug.

Windows (Vista/7RC):
There are some problems.
* Serif font is chosen in all texts and the font is not Windows-ja default (MS P Mincho).
* (Probably) All kanjis are Chinese glyphs. Please see attached win-ja-issue.png (I marked the point easy to compare).
These may be pango (win)'s issue, though.

[1]http://ossipedia.ipa.go.jp/ipafont/
Available in Ubuntu Lucid http://packages.ubuntu.com/lucid/otf-ipafont

Masato HASHIMOTO (hashimo) wrote :

I forgot to tell inkscape version.
Linux - bzr/trunk
Windows - 0.47 (0.47-3)

su_v (suv-lp) wrote :

screenshot of new 'tutorial-basic.ja.svg' with Inkscape 0.47+devel r9040 on OS X 10.5.8

su_v (suv-lp) wrote :

screenshot of old 'tutorial-basic.ja.svg' with Inkscape 0.47 r22583 on OS X 10.5.8

Masato HASHIMOTO (hashimo) wrote :

> Windows (Vista/7RC):
> * Serif font is chosen in all texts and the font is not Windows-ja default (MS P Mincho).
> * (Probably) All kanjis are Chinese glyphs.

I found the cause of the issue. pango's setting (etc\pango\pango.aliases) must be modified for Japanese.
Now there is no problem on Windows.

~suv:
Thank you for Mac's screenshots.
Serif font not seem to be substituted appropriately but it will be caused by mac X11's setting, I think.
And new tutorial not seem to have any other problems.

So I think, new xsl template should be applied.

Thanks a lot!

su_v (suv-lp) wrote :

> pango's setting (etc\pango\pango.aliases) must be modified for Japanese.

On Mac OS X Inkscape.app includes the pango and font configuration files. If you know about changes that would improve handling of Japanese fonts it could be either changed in trunk (fonts.conf, see [1]) or maybe edited when copying 'pango.aliases' from the pango installation in MacPorts into the application bundle while packaging or - if pango needs to be built with some (locale-) specific options - it could be added as hint to <http://wiki.inkscape.org/wiki/index.php/CompilingMacOsX#Installing_dependencies>.

I tried to create the previously attached screenshots with the basic (to my best knowledge nearly unchanged) font configuration on a still rather vanilla OS X Leopard installation. Installing fonts like FreeSans on a user level or modifying 'fonts.conf' inside the application bundle results in different screen output of the japanese tutorials - but unfortunately my own knowledge about this issue (fonts and the specific pango and fontconfig problems Inkscape reveals on OS X) is very limited.

[1] fonts configuration files shipped with Inkscape.app:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/packaging/macosx/Resources/etc/fonts/fonts.conf>

helix84 (helix84) wrote :

tutorial-basic.sk on Ubuntu 9.10 and Inkscape 0.47 is without any problems.

Please fix the 1 problem I mentioned, otherwise it's perfect for Slovak. Thanks.

su_v (suv-lp) wrote :

screenshot with Inkscape 0.47+devel r9029 on OS X 10.5.8 with modified 'font.conf' inside the application bundle
(most fonts installed by apple (e.g. in formats like *.dfont) have been converted to ttf format and the list of font directories seen by fontconfig has been modified to exclude the system folders and only load the locally converted ttf fonts)

su_v (suv-lp) wrote :

screenshot with Inkscape 0.47 r22583 on OS X 10.5.8 after installing FreeFonts from <http://savannah.gnu.org/projects/freefont/> on a user level. I can't reproduced this with my local builds any more - might be related to the versions of (fontconfig, pango and whatever else handles fonts ;-) the official Inkscape release for OS X was built with and that are bundled within Inkscape.app? The font configuration files are not changed in this case - only the new font installed.

(Note: I see the same results after installing FreeFonts with the new tutorials (fonts used 'Sans, Serif') and the old ones shipped with 0.47 - sorry @JazzyNico if this is off-topic in this report)

jazzynico (jazzynico) wrote :

Thanks for your pango.aliases comments! Now I know why Inkscape doesn't understand sans-serif on Windows...
I'm going to change it in the devlibs so that font-family generic fonts are CSS2 compliant.

Things to do before closing this report:
* Replace fonts in header and footer templates with generic ones.
* Commit a fixed pango.aliases file to the devlibs.

Note that there are other reports about tutorials that needs some work:
Bug #171531 (Compressed tutorials).
Bug #440194 (Tutorial changes for 0.48).

The first one is already on tracks. But since my English skills are somewhat limited, I'd appreciate it if someone could help me for the second one...
Thanks!

Masato HASHIMOTO (hashimo) wrote :

> On Mac OS X Inkscape.app includes the pango and font configuration files. If you know about changes that would improve
> handling of Japanese fonts it could be either changed in trunk (fonts.conf, see [1]) or maybe edited when copying
> 'pango.aliases' from the pango installation in MacPorts into the application bundle while packaging

I think, changing fonts.conf or pango.aliases will affect whole of CJKV (especially Chinese and Japanese).
Current pango.aliases should work appropriately on Chinese.
I also have not enough knowledge so I have no idea to solve this in CJKV wide on inkscape side.
I googled about this issue on Mac-ja but I cannot find. So it could work without major problems on Mac-ja...(I will ask about it on ja's forum).
Anyway, I added this info to faq (ja) on wiki.

jazzynico (jazzynico) wrote :

Unfortunately, replacing sans with sans-serif in pango.aliases doesn't work. Thus I keep it unchanged.
Headers and footers now use serif and sans (except when the font is explicitly set by the translator).
Footer opacity bug fixed.
Changes committed in the doc trunk, svn rev. 22662.

helix84 (helix84) wrote :

Finally I'm able to build Slovak tutorials correctly :) Thanks again!

jazzynico (jazzynico) wrote :

Tutorials committed in bzr rev. 9046.

Changed in inkscape:
status: In Progress → Fix Committed
helix84 (helix84) wrote :

There's a syntax problem in tutorial-tracing.svg (and its translations), inkscape will write the error on console when you try to open it.

I have no clue if this is related to this bug but also "make check" in doc-docbook/ prints some errors for all files.

su_v (suv-lp) wrote :

confirming error loading tutorial-tracing.svg on osx (English & German version tested)

'<path&gt;' parser error reproduced with tracing tutorial from revision 9046 and 9016
not reproduced with revision 8625 and Inkscape 0.47r22583

jazzynico (jazzynico) wrote :

I see...

Before scour, the SVG looks like:
<flowDiv xml:space="preserve">One of the features in Inkscape is a tool for tracing a bitmap image
into a &lt;path&gt; element for your SVG drawing. These short notes
should help you become acquainted with how it works.
</flowDiv>

but after is use scour, &lt; is replaced with <.

jazzynico (jazzynico) wrote :

Forgot to mention that it has nothing to do with the new fonts.
I'm going to open a new report in the scour project.

jazzynico (jazzynico) wrote :

See Bug #517064 (but I have a workaround!).

jazzynico (jazzynico) wrote :

Workaround committed in svn revision 22665.
Fixed tracing tutorials committed in bzr revision 9049.

jazzynico (jazzynico) on 2010-08-24
Changed in inkscape:
status: Fix Committed → Fix Released
su_v (suv-lp) wrote :

> IMHO, they should be specified abstractly (i.e. Sans, Serif or Monospace).

The current versions of the tutorials in Inkscape trunk use lower case names instead of the regular generic names. Inkscape's font selector and dialog however are case sensitive and don't properly handle the lowercase names in the GUI:

steps to reproduce:

1) open a tutorial
2) select a text object
3) open the 'TExt and Font' dialog
4) font preview is broken

Similarly an error is displayed in the font family selector of the text tool controls bar (e.g. font 'serif' is 'not found on the system').

Proposed fix: use capitalized names for the generic fonts. Note that this does not affect the rendering on-canvas.

(tested with Inkscape 0.48.0 and 0.48+devel r9986 on OS X 10.5.8)

jazzynico (jazzynico) wrote :

Thanks ~suv, your proposed fix looks good. I used lower case names because that's the way generic fonts are written in CSS files...
Reopening this report.

Changed in inkscape:
status: Fix Released → In Progress
jazzynico (jazzynico) wrote :

Capitalization fix confirmed on Windows and Ubuntu 10.04. Work in progress (along with other tutorial fixes).

jazzynico (jazzynico) wrote :

Footers and xsl file fixed in inkscape-doc, revision 424.
Headers, tutorial files and hand-made tutorials in progress.

jazzynico (jazzynico) wrote :

Fixed in inkscape-docs, revision 426.

Changed in inkscape-docs:
assignee: nobody → JazzyNico (jazzynico)
importance: Undecided → Low
status: New → Fix Released
jazzynico (jazzynico) on 2011-01-16
Changed in inkscape:
milestone: 0.48 → 0.49
jazzynico (jazzynico) wrote :

Updated tutorials in the trunk as of revision 10007.

Changed in inkscape:
status: In Progress → Fix Committed
jazzynico (jazzynico) on 2011-02-07
tags: added: fonts
jazzynico (jazzynico) on 2015-02-14
Changed in inkscape:
status: Fix Committed → Fix Released
jazzynico (jazzynico) on 2015-08-10
Changed in inkscape-docs:
milestone: none → 0.91
To post a comment you must log in.