Updated Files
libbirdfont/Renderer/CachedFont.vala |
libbirdfont/Tool.vala |
--- a/libbirdfont/Renderer/CachedFont.vala
+++ b/libbirdfont/Renderer/CachedFont.vala
@@ -64,13 +64,18 @@
public Glyph? get_glyph_by_name (string name) {
Glyph? g = null;
Font f;
+ Glyph glyph;
if (font != null) {
f = (!) font;
g = f.get_glyph_by_name (name);
- g.top_limit = f.top_limit;
- g.baseline = f.base_line;
- g.bottom_limit = f.bottom_limit;
+
+ if (g != null) {
+ glyph = (!) g;
+ glyph.top_limit = f.top_limit;
+ glyph.baseline = f.base_line;
+ glyph.bottom_limit = f.bottom_limit;
+ }
}
if (g == null && name.char_count () == 1) {
@@ -81,9 +86,10 @@
return null;
}
- g.top_limit = f.top_limit;
- g.baseline = f.base_line;
- g.bottom_limit = f.bottom_limit;
+ glyph = (!) g;
+ glyph.top_limit = f.top_limit;
+ glyph.baseline = f.base_line;
+ glyph.bottom_limit = f.bottom_limit;
}
return g;
--- a/libbirdfont/Tool.vala
+++ b/libbirdfont/Tool.vala
@@ -340,7 +340,7 @@
cr.stroke ();
iconx = bgx + 1 + (w - 1) / 2 - icon_font.get_sidebearing_extent () / 2;
- icony = bgy - 1 + (h - 1) / 2 - icon_font.get_height () / 2;
+ icony = bgy + 1 + (h - 1) / 2 - icon_font.get_height () / 2;
if (icon_color == "") {
if (!selected) {