The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Merge ../birdfont-2.x

These changes was commited to the Birdfont repository Sat, 03 Dec 2016 19:36:15 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 03 Dec 2016 19:36:15 +0000 (20:36 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 03 Dec 2016 19:36:15 +0000 (20:36 +0100)
commit 4e7839bd7ca30cc66f922d2dc835454ecad90388
tree 11bc065b69eca233c1740c2ad96d2efa3679062a
parent 982c80b242a2627ee7d38e48ed533247e11e8c9f
parent 5685625bc81b6f853e1991edb1cd472c79e85c36
Merge ../birdfont-2.x

libbirdfont/SvgFontFormatWriter.vala
--- a/libbirdfont/SvgFontFormatWriter.vala +++ b/libbirdfont/SvgFontFormatWriter.vala @@ -59,8 +59,16 @@ put ("<defs>"); - put (@"<font id=\"$font_name\" horiz-adv-x=\"250\" >"); + string font_id = font_name.replace (" ", "-"); + Glyph space = font.get_space ().get_current (); + double space_width = space.get_width (); + + put (@"<font id=\"$font_id\" horiz-adv-x=\"$(to_float (space_width))\" >"); put (@"<font-face units-per-em=\"$(to_float (units_per_em))\" ascent=\"$(to_float (ascent))\" descent=\"$(to_float (descent))\" />"); + + put (@"<font-src>"); + put (@"\t<font-face-name=\"$font_name\">"); + put (@"</font-src>"); // (missing-glyph goes here)