Commit f1c5f11
fix compile warnings
Changed files (6)
modifiedlibbirdfont/Font.valamodifiedlibbirdfont/KerningDisplay.valamodifiedlibbirdfont/OpenFontFormatReader.valamodifiedlibbirdfont/OpenFontFormatWriter.valamodifiedlibbirdfont/TestCases.valamodifiedlibbirdfont/load_svg_font.c
Diff
@@ -875,7 +875,7 @@ public class Font : GLib.Object { int error; SvgFont svg_loader = new SvgFont (this); - data = load_svg_font (path, out error);+ data = load_freetype_font (path, out error); if (error != 0) { warning ("Failed to load font.");@@ -171,12 +171,7 @@ public class KerningDisplay : FontDisplay { }- - private double get_kerning (string a, string b) {- Font font = BirdFont.get_current_font ();- return font.get_kerning_by_name (a, b);- }- + public override void selected_canvas () { Glyph g; GlyphSequence w;@@ -16,7 +16,7 @@ */ [CCode (cname = "load_svg_font")]-public extern static StringBuilder? load_svg_font (string file, out int error);+public extern static StringBuilder? load_freetype_font (string file, out int error); [CCode (cname = "validate_freetype_font")] public extern static bool validate_freetype_font (string file);@@ -2316,12 +2316,6 @@ class HmtxTable : Table { return left_side_bearing[i] * 1000 / head_table.get_units_per_em (); } - - /** Get left side bearing relative to xmin for monospaces fonts. */ - public double get_lsb_mono (uint32 i) - requires (i < nmonospaced && left_side_bearing_monospaced != null) { - return left_side_bearing_monospaced[i] * 1000 / head_table.get_units_per_em (); - } public new void parse (FontData dis, HheaTable hhea_table, LocaTable loca_table) throws GLib.Error { nmetrics = hhea_table.num_horizontal_metrics; @@ -78,7 +78,7 @@ class TestCases { warning ("The font does not pass freetype validation."); } - data = load_svg_font ((!) f.get_path (), out error);+ data = load_freetype_font ((!) f.get_path (), out error); if (error != 0) { warning ("Failed to load font."); return;@@ -332,7 +332,7 @@ int validate_font (FT_Face face) { /** Load typeface with freetype2 and return the result as a SVG font. * Parameter err will be set to non zero vaule if an error occurs. */-GString* load_svg_font (char* file, int* err) {+GString* load_freetype_font (char* file, int* err) { GString* svg = NULL; FT_Library library;@@ -343,7 +343,7 @@ GString* load_svg_font (char* file, int* err) { error = FT_Init_FreeType (&library); if (error != OK) {- fprintf (stderr, "Freetype init error %d\n", error);+ fprintf (stderr, "Freetype init error %d.\n", error); *err = error; return svg; }