+
+ int kerning_size = 0;
+ for(t=0;t<font->num_glyphs;t++) {
+ dict_t* d = src->kerning[t];
+ if(!d) continue;
+ DICT_ITERATE_ITEMS(d,void*,key,mtf_t*,m) {
+ if(m) {
+ kerning_size++;
+ }
+ }
+ }
+ font->kerning_size = kerning_size;
+ font->kerning = (gfxkerning_t*)malloc(sizeof(gfxkerning_t)*kerning_size);
+ int pos = 0;
+ for(t=0;t<font->num_glyphs;t++) {
+ dict_t* d = src->kerning[t];
+ if(!d) continue;
+ DICT_ITERATE_ITEMS(d,void*,key,mtf_t*,m) {
+ if(m) {
+ font->kerning[pos].c1 = t;
+ font->kerning[pos].c2 = (int)(ptroff_t)key;
+ font->kerning[pos].advance = (int)(ptroff_t)m->first->key;
+ pos++;
+ }
+ }
+ }
+ //int advance = (int)(ptroff_t)m->first->key;
+