diff options
| author | Bryce Harrington <bryce@bryceharrington.org> | 2008-01-05 10:38:18 +0000 |
|---|---|---|
| committer | bryce <bryce@users.sourceforge.net> | 2008-01-05 10:38:18 +0000 |
| commit | 512f06a80f013e903d513b6ffa069d48c6abbfaa (patch) | |
| tree | 966213a353297141089cd8c080ede6ac6a4385e8 /src/extension/internal/pdfinput/svg-builder.cpp | |
| parent | Fixing up a few more files (diff) | |
| download | inkscape-512f06a80f013e903d513b6ffa069d48c6abbfaa.tar.gz inkscape-512f06a80f013e903d513b6ffa069d48c6abbfaa.zip | |
Applying Gail's patch for font-specification
(Closes LP: #169973)
- 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
separation
- Text and Styles dialog shows only fonts it can handle
(bzr r4392)
Diffstat (limited to 'src/extension/internal/pdfinput/svg-builder.cpp')
| -rw-r--r-- | src/extension/internal/pdfinput/svg-builder.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 3d96991a6..076f12906 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -1169,7 +1169,14 @@ void SvgBuilder::_flushText() { break; } else { tspan_node = _xml_doc->createElement("svg:tspan"); - tspan_node->setAttribute("inkscape:font-specification", glyph.font_specification); + + /////// + // Create a font specification string and save the attribute in the style + PangoFontDescription *descr = pango_font_description_from_string(glyph.font_specification); + Glib::ustring properFontSpec = font_factory::Default()->ConstructFontSpecification(descr); + pango_font_description_free(descr); + sp_repr_css_set_property(glyph.style, "-inkscape-font-specification", properFontSpec.c_str()); + // Set style and unref SPCSSAttr if it won't be needed anymore sp_repr_css_change(tspan_node, glyph.style, "style"); if ( glyph.style_changed && i != _glyphs.begin() ) { // Free previous style |
