Updated Files
libbirdfont/BirdFontFile.vala |
libbirdfont/EditPoint.vala |
libbirdfont/EditPointHandle.vala |
libbirdfont/Glyph.vala |
libbirdfont/GlyphCollection.vala |
libbirdfont/Path.vala |
libbirdfont/Renderer/FallbackFont.vala |
libbirdfont/Renderer/FontCache.vala |
libbirdfont/Renderer/Text.vala |
libbirdfont/VersionList.vala |
--- a/libbirdfont/BirdFontFile.vala
+++ b/libbirdfont/BirdFontFile.vala
@@ -1136,16 +1136,12 @@
foreach (Tag t in tag) {
if (t.get_name () == "glyph") {
parse_glyph (t, gc, name, unicode, selected_id, unassigned);
-
- print (@"g e2: $(gc.get_current ().ref_count)\n");
}
}
if (new_glyph_collection) {
font.add_glyph_collection (gc);
}
-
- print (@"g 2: $(gc.get_current ().ref_count)\n");
}
private int parse_selected (Tag tag) {
@@ -1214,10 +1210,8 @@
glyph.version_id = (has_id) ? id : (int) gc.length () + 1;
gc.set_unassigned (unassigned);
- print (@"i parse_glyph $(glyph.ref_count)\n");
gc.insert_glyph (glyph, selected || selected_id == id);
glyph = new Glyph.no_lines ("");
- print (@"i2 parse_glyph $(glyph.ref_count)\n");
}
private Path parse_path (Tag tag) {
--- a/libbirdfont/EditPoint.vala
+++ b/libbirdfont/EditPoint.vala
@@ -188,7 +188,6 @@
}
n_points++;
- print (@"n_points: $(n_points)\n");
}
~EditPoint () {
--- a/libbirdfont/EditPointHandle.vala
+++ b/libbirdfont/EditPointHandle.vala
@@ -100,8 +100,6 @@
this.selected = false;
n_handles++;
-
- print (@"EditPointHandle $(n_handles)\n");
}
~EditPointHandle () {
--- a/libbirdfont/Glyph.vala
+++ b/libbirdfont/Glyph.vala
@@ -121,9 +121,7 @@
left_limit = -28;
right_limit = 28;
- n_instances++;
-
- warning (@"glyphs $name: $(n_instances)");
+ n_instances++;
}
public Glyph.no_lines (string name, unichar unichar_code = 0) {
@@ -133,7 +131,6 @@
path_list.add (new Path ());
n_instances++;
- warning (@"glyphs no lines $name: $(n_instances)");
}
static int n_instances = 0;
--- a/libbirdfont/GlyphCollection.vala
+++ b/libbirdfont/GlyphCollection.vala
@@ -26,9 +26,7 @@
public GlyphCollection (unichar unicode_character, string name) {
this.unicode_character = unicode_character;
this.name = name;
- print (@"GlyphCollection: $(ref_count)\n");
versions = new VersionList (null, this);
- print (@"Afer version list GlyphCollection: $(ref_count)\n");
}
public GlyphCollection.with_glyph (unichar unicode_character, string name) {
@@ -38,10 +36,7 @@
this.name = name;
g = new Glyph (name, unicode_character);
-
- print (@"GlyphCollection: $(ref_count)\n");
versions = new VersionList (g, this);
- print (@"Afer version list GlyphCollection: $(ref_count)\n");
}
~GlyphCollection () {
@@ -69,9 +64,7 @@
}
public void insert_glyph (Glyph g, bool selected) {
- print (@"Before VersionList $(g.ref_count)\n");
versions.add_glyph (g, selected);
- print (@"After VersionList $(g.ref_count)\n");
assert (versions.glyphs.size > 0);
}
--- a/libbirdfont/Path.vala
+++ b/libbirdfont/Path.vala
@@ -97,7 +97,6 @@
}
n_paths++;
- print (@"Paths: $n_paths\n");
}
~Path () {
--- a/libbirdfont/Renderer/FallbackFont.vala
+++ b/libbirdfont/Renderer/FallbackFont.vala
@@ -112,7 +112,6 @@
public Font get_single_glyph_font (unichar c) {
Font f = load_glyph_from_ttf (c);
- print (@"font e1 : $(f.ref_count)\n");
return f;
}
@@ -122,25 +121,16 @@
FontFace* font;
bf_font = new Font ();
-
- if (bf_font != null)
- print (@"font e1 a : $(((!)bf_font).ref_count)\n");
for (int i = fallback_fonts.size - 1; i >= 0; i--) {
f = fallback_fonts.get (i);
font = open_font ((!) f.get_path ());
bf_font = get_glyph_in_font ((!) font, c);
-
- if (bf_font != null)
- print (@"font e1 b : $(((!)bf_font).ref_count)\n");
close_font (font);
if (bf_font != null) {
- if (((!)bf_font).get_glyph_by_name ((!) c.to_string ()) != null)
- print (@"first: $(((!) ((!)bf_font).get_glyph_by_name ((!) c.to_string ())).ref_count)\n");
-
return (!) bf_font;
}
}
@@ -153,8 +143,6 @@
GlyphCollection gc;
BirdFontFile bf_parser;
Font bf_font = new Font ();
-
- print (@"font e1 before load : $(bf_font.ref_count)\n");
gc = new GlyphCollection (c, (!)c.to_string ());
glyph_data = load_glyph (font, (uint) c);
@@ -163,17 +151,9 @@
return null;
}
- print (@"font e1 before parser : $(bf_font.ref_count)\n");
bf_parser = new BirdFontFile (bf_font);
- print (@"font e2 before parser1 : $(bf_font.ref_count)\n");
bf_parser.load_data (((!) glyph_data).str);
- print (@"font e1 before parser load : $(bf_font.ref_count)\n");
-
- if (((!)bf_font).get_glyph_by_name ((!) c.to_string ()) != null)
- print (@"after parser: $(((!) ((!)bf_font).get_glyph_by_name ((!) c.to_string ())).ref_count)\n");
-
bf_parser = new BirdFontFile (new Font ());
- print (@"font e1 after remove parser : $(bf_font.ref_count)\n");
return bf_font;
}
--- a/libbirdfont/Renderer/FontCache.vala
+++ b/libbirdfont/Renderer/FontCache.vala
@@ -112,8 +112,6 @@
}
if (g == null && name.char_count () == 1) {
- return null; //FIXME
-
f = fallback_font.get_single_glyph_font (name.get_char (0));
g = f.get_glyph_by_name (name);
@@ -124,48 +122,8 @@
top_limit = f.top_limit;
base_line = f.base_line;
bottom_limit = f.bottom_limit;
-
- GlyphCollection? gc = f.get_glyph_collection (name);
- if (gc != null) {
- print (@"GC BEFORE UNREF: $(((!)gc).ref_count)\n");
- }
-
- print (@"before bad unref: $(((!)g).ref_count)\n");
- //((!)g).unref (); //FIXME:
- f = new Font (); // FIXME DELTE
- print (@"after bad unref: $(((!)g).ref_count)\n");
-
- if (gc != null) {
- print (@"GC AFTER UNREF: $(((!)gc).ref_count)\n");
- }
-
- }
-
- print (@"font in get_glyph_by_name: $(f.ref_count)\n");
-
-
- if (g != null) {
- print (@"b: $(((!)g).ref_count)\n");
}
-
- Glyph tg;
-
- // FIXME: DELETE
- tg = new Glyph ("");
- print (@"tg: $(tg.ref_count)\n");
-
- {
- GlyphCollection tgc = new GlyphCollection ('\0', "");
- tgc.add_glyph (tg);
-
- print (@"after add tg: $(tg.ref_count)\n");
-
- tgc.versions.glyphs.clear ();
- }
-
- print (@"DONE tg: $(tg.ref_count)\n");
-
return g;
}
--- a/libbirdfont/Renderer/Text.vala
+++ b/libbirdfont/Renderer/Text.vala
@@ -58,13 +58,11 @@
set_font_size (size);
set_text (text);
- warning (@"ntext: $(ntext)");
ntext++;
}
~Text () {
ntext--;
- warning (@"remove ntext: $(ntext)");
}
public void use_cache (bool cache) {
--- a/libbirdfont/VersionList.vala
+++ b/libbirdfont/VersionList.vala
@@ -25,8 +25,6 @@
public VersionList (Glyph? g = null, GlyphCollection glyph_collection) {
base ();
-
- print (@"VersionList: glyph_collection: $(glyph_collection.ref_count)\n");
this.glyph_collection = glyph_collection;
glyphs = new Gee.ArrayList<Glyph> ();