Clone in a terminal:
Commit cb81b2b
Johan Mattsson - 2015-11-18T11:03:55+00:00
cb81b2b063167891324835915ce3f20bbc980035johan.mattsson.m@gmail.com

Language fix

Changed files (12)

Diff

diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex 391cdb0..266ee64 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -622,8 +622,8 @@ public class Font : GLib.Object { 	}  	// FIXME: the order of ligature substitutions-	public GlyphCollection? get_ligature (uint indice) {-		return ligature.nth (indice);+	public GlyphCollection? get_ligature (uint index) {+		return ligature.nth (index); 	} 	 	/** Obtain all versions and alterntes for this glyph. */@@ -666,18 +666,18 @@ public class Font : GLib.Object { 		return ((!)gc).get_current (); 	} 	-	public GlyphCollection? get_glyph_collection_indice (unichar glyph_indice) {-		if (!(0 <= glyph_indice < glyph_name.length ())) {+	public GlyphCollection? get_glyph_collection_index (unichar glyph_index) {+		if (!(0 <= glyph_index < glyph_name.length ())) { 			return null; 		} 		-		return glyph_name.nth (glyph_indice);+		return glyph_name.nth (glyph_index); 	} 	-	public Glyph? get_glyph_indice (unichar glyph_indice) {+	public Glyph? get_glyph_index (unichar glyph_index) { 		GlyphCollection? gc; 		-		gc = get_glyph_collection_indice (glyph_indice);+		gc = get_glyph_collection_index (glyph_index); 		 		if (gc != null) { 			return ((!) gc).get_current ();diff --git a/libbirdfont/OpenFontFormat/CmapSubtableFormat0.vala b/libbirdfont/OpenFontFormat/CmapSubtableFormat0.valaindex 7e09218..92e9146 100644--- a/libbirdfont/OpenFontFormat/CmapSubtableFormat0.vala+++ b/libbirdfont/OpenFontFormat/CmapSubtableFormat0.vala@@ -35,12 +35,12 @@ public class CmapSubtableFormat0 : GLib.Object { 	} 	 	uint8 get_gid_for_unichar (unichar c, GlyfTable glyf_table) {-		uint32 indice = 0;+		uint32 index = 0; 		foreach (GlyphCollection g in glyf_table.glyphs) { 			if (g.get_unicode_character () == c && !g.is_unassigned ()) {-				return (indice <= uint8.MAX) ? (uint8) indice : 0;+				return (index <= uint8.MAX) ? (uint8) index : 0; 			}-			indice++;+			index++; 		} 		return 0;		 	}diff --git a/libbirdfont/OpenFontFormat/CmapSubtableFormat12.vala b/libbirdfont/OpenFontFormat/CmapSubtableFormat12.valaindex 747edd2..06803d3 100644--- a/libbirdfont/OpenFontFormat/CmapSubtableFormat12.vala+++ b/libbirdfont/OpenFontFormat/CmapSubtableFormat12.vala@@ -25,7 +25,7 @@ public class CmapSubtableFormat12 : GLib.Object { 		Gee.ArrayList<UniRange> ranges; 		FontData fd = new FontData (); 		uint32 first_assigned;-		uint32 indice;+		uint32 index; 		 		first_assigned = 1; 		@@ -45,7 +45,7 @@ public class CmapSubtableFormat12 : GLib.Object { 		fd.add_u32 (0); // Language 		fd.add_u32 ((uint32) ranges.size); // Number of groupings 		-		indice = first_assigned;+		index = first_assigned; 		foreach (UniRange u in ranges) { 			 			if (u.start >= 0xFFFFFFFF || u.stop >= 0xFFFFFFFF) {@@ -53,9 +53,9 @@ public class CmapSubtableFormat12 : GLib.Object { 			} else { 				fd.add_u32 (u.start); 				fd.add_u32 (u.stop);-				fd.add_u32 (indice);+				fd.add_u32 (index); 				-				indice += u.length ();+				index += u.length (); 			} 		} 		diff --git a/libbirdfont/OpenFontFormat/CmapSubtableFormat4.vala b/libbirdfont/OpenFontFormat/CmapSubtableFormat4.valaindex 6286e76..6b36372 100644--- a/libbirdfont/OpenFontFormat/CmapSubtableFormat4.vala+++ b/libbirdfont/OpenFontFormat/CmapSubtableFormat4.vala@@ -29,21 +29,21 @@ public class CmapSubtableFormat4 : GLib.Object { 		return table.size (); 	} 	-	public unichar get_char (uint32 indice) {-		int64? c = table.lookup (indice);+	public unichar get_char (uint32 index) {+		int64? c = table.lookup (index); 		-		if (c == 0 && indice == 0) {+		if (c == 0 && index == 0) { 			return 0; 		} 		 		if (c == 0) {-			while (table.lookup (--indice) == 0) {-				if (indice == 0) {+			while (table.lookup (--index) == 0) {+				if (index == 0) { 					return 0; 				} 			}  			-			warning (@"There is no character for glyph number $indice in cmap table. table.size: $(table.size ()))");+			warning (@"There is no character for glyph number $index in cmap table. table.size: $(table.size ()))"); 			return 0; 		} 		@@ -131,7 +131,7 @@ public class CmapSubtableFormat4 : GLib.Object { 		} 		 		// map all values in a hashtable-		int indice = 0;+		int index = 0; 		unichar character = 0; 		uint32 id; 		for (uint16 i = 0; i < seg_count && start_char[i] != 0xFFFF; i++) {@@ -141,10 +141,10 @@ public class CmapSubtableFormat4 : GLib.Object { 			uint16 j = 0; 			do { 				character = start_char[i] + j;-				indice = start_char[i] + id_delta[i] + j;+				index = start_char[i] + id_delta[i] + j; 				 				if (id_range_offset[i] == 0) {-					table.insert (indice, character);+					table.insert (index, character); 				} else { 					// the indexing trick: 					id = id_range_offset[i] / 2 + j + i - seg_count;@@ -154,12 +154,12 @@ public class CmapSubtableFormat4 : GLib.Object { 						break; 					} 					-					indice = glyph_id_array [id] + id_delta[i];+					index = glyph_id_array [id] + id_delta[i]; 										 					StringBuilder s = new StringBuilder (); 					s.append_unichar (character); 										-					table.insert (indice, character);+					table.insert (index, character); 				} 				 				j++;@@ -187,7 +187,7 @@ public class CmapSubtableFormat4 : GLib.Object { 		 		uint16 gid_length = 0; 		-		uint32 indice;+		uint32 index; 		uint32 first_assigned; 		 		first_assigned = 1;@@ -220,13 +220,13 @@ public class CmapSubtableFormat4 : GLib.Object { 		fd.add_ushort (range_shift);										 		 		// end codes-		indice = first_assigned;+		index = first_assigned; 		foreach (UniRange u in ranges) { 			if (u.stop >= 0xFFFF) { 				warning ("Not implemented yet."); 			} else { 				fd.add_ushort ((uint16) u.stop);-				indice += u.length ();+				index += u.length (); 			} 		} 		fd.add_ushort (0xFFFF);@@ -234,25 +234,25 @@ public class CmapSubtableFormat4 : GLib.Object { 		fd.add_ushort (0); // Reserved 		 		// start codes-		indice = first_assigned; // since first glyph are notdef, null and nonmarkingreturn+		index = first_assigned; // since first glyph are notdef, null and nonmarkingreturn 		foreach (UniRange u in ranges) { 			if (u.start >= 0xFFFF) { 				warning ("Not implemented yet."); 			} else { 				fd.add_ushort ((uint16) u.start);-				indice += u.length ();+				index += u.length (); 			} 		} 		fd.add_ushort (0xFFFF);  		// delta-		indice = first_assigned;+		index = first_assigned; 		foreach (UniRange u in ranges) {-			if ((u.start - indice) > 0xFFFF && u.start > indice) {+			if ((u.start - index) > 0xFFFF && u.start > index) { 				warning ("Need range offset."); 			} else {-				fd.add_ushort ((uint16) (indice - u.start));-				indice += u.length ();+				fd.add_ushort ((uint16) (index - u.start));+				index += u.length (); 			} 		} 		fd.add_ushort (1);diff --git a/libbirdfont/OpenFontFormat/CodePageBits.vala b/libbirdfont/OpenFontFormat/CodePageBits.valaindex a3281ae..c079e44 100644--- a/libbirdfont/OpenFontFormat/CodePageBits.vala+++ b/libbirdfont/OpenFontFormat/CodePageBits.vala@@ -37,14 +37,14 @@ public class CodePageBits : GLib.Object { 	} 	 	public void get_pages (Font font, out uint32 p0, out uint32 p1) {-		uint32 indice, a0, a1;+		uint32 index, a0, a1; 		GlyphCollection? gl; 		GlyphCollection g; 		 		p0 = 0; 		p1 = 0; 		-		for (indice = 0; (gl = font.get_glyph_collection_indice (indice)) != null; indice++) {		+		for (index = 0; (gl = font.get_glyph_collection_index (index)) != null; index++) {		 			g = (!) gl; 			 			if (!g.is_unassigned ()) {diff --git a/libbirdfont/OpenFontFormat/GlyfTable.vala b/libbirdfont/OpenFontFormat/GlyfTable.valaindex 7ea3e3b..677238e 100644--- a/libbirdfont/OpenFontFormat/GlyfTable.vala+++ b/libbirdfont/OpenFontFormat/GlyfTable.vala@@ -139,7 +139,7 @@ public class GlyfTable : OtfTable { 		GlyphCollection gc; 		GlyphCollection? gcn; 		Font font = OpenFontFormatWriter.get_current_font ();-		uint32 indice;+		uint32 index; 		Gee.ArrayList<GlyphCollection> unassigned_glyphs; 		bool unassigned; 		@@ -151,12 +151,12 @@ public class GlyfTable : OtfTable { 		 		unassigned_glyphs = new Gee.ArrayList<GlyphCollection> (); 		-		if (font.get_glyph_indice (0) == null) {+		if (font.get_glyph_index (0) == null) { 			warning ("No glyphs in font."); 		} 			 		// add glyphs-		for (indice = 0; (gcn = font.get_glyph_collection_indice (indice)) != null; indice++) {		+		for (index = 0; (gcn = font.get_glyph_collection_index (index)) != null; index++) {		 			gc = (!) gcn; 			gc = gc.copy_deep (); 			g = gc.get_current ();diff --git a/libbirdfont/OpenFontFormat/GposTable.vala b/libbirdfont/OpenFontFormat/GposTable.valaindex 028494c..31ed992 100644--- a/libbirdfont/OpenFontFormat/GposTable.vala+++ b/libbirdfont/OpenFontFormat/GposTable.vala@@ -64,7 +64,7 @@ public class GposTable : OtfTable { 		 		fd.add_ushort (0); // feature prameters (null) 		fd.add_ushort (1); // number of lookups-		fd.add_ushort (0); // lookup indice+		fd.add_ushort (0); // lookup index 		 		// lookup table 		fd.add_ushort (1); // number of lookupsdiff --git a/libbirdfont/OpenFontFormat/UnicodeRangeBits.vala b/libbirdfont/OpenFontFormat/UnicodeRangeBits.valaindex 2bc66e0..65e202f 100644--- a/libbirdfont/OpenFontFormat/UnicodeRangeBits.vala+++ b/libbirdfont/OpenFontFormat/UnicodeRangeBits.vala@@ -23,7 +23,7 @@ public class UnicodeRangeBits : GLib.Object { 	} 	 	public void get_ranges (Font font, out uint32 r0, out uint32 r1, out uint32 r2, out uint32 r3) {-		uint32 indice;+		uint32 index; 		GlyphCollection? gl; 		GlyphCollection g; 		int bit;@@ -33,7 +33,7 @@ public class UnicodeRangeBits : GLib.Object { 		r2 = 0; 		r3 = 0; 		-		for (indice = 0; (gl = font.get_glyph_collection_indice (indice)) != null; indice++) {		+		for (index = 0; (gl = font.get_glyph_collection_index (index)) != null; index++) {		 			g = (!) gl; 			if (!g.is_unassigned ()) { 				bit = get_bit (g.get_unicode_character ());diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex a5eac96..2efbf2c 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -137,7 +137,7 @@ public class OverView : FontDisplay { 		f = BirdFont.get_current_font (); 		 		for (int index = 0; index < f.length (); index++) {-			glyphs = f.get_glyph_collection_indice ((uint32) index);+			glyphs = f.get_glyph_collection_index ((uint32) index); 			return_if_fail (glyphs != null); 			 			selected_items.add ((!) glyphs);@@ -537,7 +537,7 @@ public class OverView : FontDisplay { 					break; 				} 				-				glyphs = f.get_glyph_collection_indice ((uint32) index);+				glyphs = f.get_glyph_collection_index ((uint32) index); 				return_if_fail (glyphs != null); 				 				glyph = ((!) glyphs).get_current ();@@ -819,7 +819,7 @@ public class OverView : FontDisplay { 		 		if (all_available) { 			f = BirdFont.get_current_font ();-			g = f.get_glyph_indice (selected);+			g = f.get_glyph_index (selected); 			return_val_if_fail (g != null, "".dup ()); 			return ((!) g).get_name (); 		}@@ -1120,7 +1120,7 @@ public class OverView : FontDisplay { 				// FIXME: too slow 				for (r = 0; r < font.length (); r += items_per_row) { 					for (i = 0; i < items_per_row; i++) {-						glyphs = font.get_glyph_collection_indice ((uint32) r + i);+						glyphs = font.get_glyph_collection_index ((uint32) r + i); 						return_if_fail (glyphs != null); 						glyph = ((!) glyphs).get_current (); 						@@ -1499,7 +1499,7 @@ public class OverView : FontDisplay { 						copied_glyphs.get (i).is_unassigned (),  						copied_glyphs.get (i).get_name ()); 				} else {-					c = f.get_glyph_collection_indice ((uint32) index);+					c = f.get_glyph_collection_index ((uint32) index); 				} 				 				if (c == null) {diff --git a/libbirdfont/OverviewTools.vala b/libbirdfont/OverviewTools.valaindex 4e91137..c6f9d78 100644--- a/libbirdfont/OverviewTools.vala+++ b/libbirdfont/OverviewTools.vala@@ -187,7 +187,7 @@ public class OverviewTools : ToolCollection  { 		Font font = BirdFont.get_current_font (); 		int i = 0; 		GlyphCollection glyph_collection;-		GlyphCollection? gc = font.get_glyph_collection_indice (i);+		GlyphCollection? gc = font.get_glyph_collection_index (i); 		Glyph g; 		 		while (gc != null) {@@ -201,7 +201,7 @@ public class OverviewTools : ToolCollection  { 			glyph_collection.set_selected_master (master); 			 			i++;-			gc = font.get_glyph_collection_indice (i);+			gc = font.get_glyph_collection_index (i); 		}  		MainWindow.get_overview ().update_item_list ();diff --git a/libbirdfont/SvgFontFormatWriter.vala b/libbirdfont/SvgFontFormatWriter.valaindex 45f381d..d4948d7 100644--- a/libbirdfont/SvgFontFormatWriter.vala+++ b/libbirdfont/SvgFontFormatWriter.vala@@ -45,7 +45,7 @@ class SvgFontFormatWriter : Object  { 		 		Glyph? g; 		Glyph glyph;-		unichar indice = 0;+		unichar index = 0; 		 		string uni; 		@@ -66,7 +66,7 @@ class SvgFontFormatWriter : Object  {  		// regular glyphs  		while (true) {-			g = font.get_glyph_indice (indice++);+			g = font.get_glyph_index (index++); 			 			if (g == null) { 				break;diff --git a/libbirdfont/TestCases.vala b/libbirdfont/TestCases.valaindex 057bdcf..b6ae008 100644--- a/libbirdfont/TestCases.vala+++ b/libbirdfont/TestCases.vala@@ -141,7 +141,7 @@ class TestCases { 		 		for (int i = 0; i < 10; i++) { 			for (int j = 0; j < 10; j++) {-				g = font.get_glyph_indice (Random.int_range (0, (int) font.length () - 1));+				g = font.get_glyph_index (Random.int_range (0, (int) font.length () - 1)); 				return_if_fail (g != null); 				if (Random.int_range (1, 9) % 3 == 0) { 					k.add_kerning_class (Random.int_range (0, 9));

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112