Font Specification Implementation

Bug #169973 reported by Gail on 2007-08-20
Affects Status Importance Assigned to Milestone

Bug Description

- New attribute in an object's style string called
-inkscape-font-specification stores full font name

- This will be useful when we can support fonts that don't fit into the
confines of CSS (if either pango enhances their PangoFontDescription
structure, or we can get around its limitations)

- Framework in place to separate font families from their "styles" (faces)
in the text and font dialog - need only the code that does the actual

- Text and Styles dialog shows only fonts it can handle

Gail (gbanaszk) wrote :

Originator: NO

First of all, why do you call the attribute -inkscape-font-specification?
it is not standard SVG and therefore must be in Inkscape namespace:
inkscape:font-specification, otherwise it will be invalid SVG. This is also
what Miklos used in his PDF import code.

I think you chose this name because nonstandard CSS properties must start
with - and cannot contain a colon. But, why do we need this value as a CSS
property at all? You can still store its value in SPStyle without it being
part of style="" string (I think). Or at least, if we do use
-inkscape-font-specification CSS property, we must have it named
inkscape:font-specification when written as an attribute.

Also, why did you remove support for the font proprty in SPStyle? It is
standard CSS and we must support it, it's actually different from the new
inkscape font spec property. Currently it's not well supported, but it's no
reason to remove it.

Bryce Harrington (bryce) wrote :

Hi Gbanask,

Thanks for your work on this patch, it sounds like this could add some useful functionality to the text and font dialog.
Could you update the patch to account for the feedback from Bulia?


Gail (gbanaszk) wrote :

I left the attribute "-inkscape-font-specification" named as is but ensured that it was used consistently as a CSS attribute (fixing the SVG builder code). I went this route rather than an XML attribute based on Richard's guidance. It does seem to make most sense to keep it together with the other CSS attributes because its purpose is to give an alternative description of the same thing (and eventually a description that tells more than the standard CSS attributes). If further discussion is needed on this matter, please let me (and Richard) know.

Added back the font property in SPStyle (an oversight to take it out - must have incorrectly figured new font spec replaced it based on comments about its lack of use in the code). Also made a few small changes as suggested by Richard in the summer. Could do some more major refactoring but to do it well would require touching things I did not work on, which is not safe for this release.

vonHalenbach (lustik) on 2008-01-01
Changed in inkscape:
importance: Undecided → Wishlist
milestone: none → 0.46
status: New → Triaged
Bryce Harrington (bryce) wrote :

Applied and committed.

Changed in inkscape:
status: Triaged → Fix Released
su_v (suv-lp) on 2010-01-02
tags: added: styles svg text
removed: other
su_v (suv-lp) on 2010-01-02
tags: added: fonts
removed: text
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers