Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 36702) +++ trunk/src/font.c (revision 36703) @@ -100,11 +100,6 @@ return NULL; } -pcb_font_t *pcb_font_old(pcb_board_t *pcb, rnd_font_id_t id, int fallback) -{ - return (pcb_font_t *)pcb_font_(pcb, id, fallback, 0); -} - rnd_font_t *pcb_font(pcb_board_t *pcb, rnd_font_id_t id, int fallback) { return pcb_font_(pcb, id, fallback, 0); @@ -160,8 +155,8 @@ if (fk->hash_inited) { htip_entry_t *e; for (e = htip_first(&fk->fonts); e; e = htip_next(&fk->fonts, e)) { - pcb_font_t *f = e->value; - rnd_font_free(&f->rnd_font); + rnd_font_t *f = e->value; + rnd_font_free(f); } htip_uninit(&fk->fonts); fk->hash_inited = 0; @@ -174,8 +169,8 @@ if (fk->hash_inited) { htip_entry_t *e; for (e = htip_first(&fk->fonts); e; e = htip_first(&fk->fonts)) { - pcb_font_t *f = e->value; - rnd_font_free(&f->rnd_font); + rnd_font_t *f = e->value; + rnd_font_free(f); htip_delentry(&fk->fonts, e); } } @@ -195,7 +190,7 @@ int pcb_del_font(pcb_fontkit_t *fk, rnd_font_id_t id) { htip_entry_t *e; - pcb_font_t *f; + rnd_font_t *f; if ((id == 0) || (!fk->hash_inited) || (htip_get(&fk->fonts, id) == NULL)) return -1; @@ -202,7 +197,7 @@ e = htip_popentry(&fk->fonts, id); f = e->value; - rnd_font_free(&f->rnd_font); + rnd_font_free(f); rnd_event(&PCB->hidlib, PCB_EVENT_FONT_CHANGED, "i", id); if (id == fk->last_id) update_last_id(fk); @@ -212,7 +207,7 @@ int pcb_move_font(pcb_fontkit_t *fk, rnd_font_id_t src, rnd_font_id_t dst) { htip_entry_t *e; - pcb_font_t *src_font; + rnd_font_t *src_font; if ((!fk->hash_inited) || (htip_get(&fk->fonts, src) == NULL)) return -1; @@ -223,13 +218,13 @@ src_font = e->value; if (dst == 0) { rnd_font_free(&fk->dflt); - rnd_font_copy(&fk->dflt, &src_font->rnd_font); - rnd_font_free(&src_font->rnd_font); + rnd_font_copy(&fk->dflt, src_font); + rnd_font_free(src_font); fk->dflt.id = 0; } else { htip_set(&fk->fonts, dst, src_font); - src_font->rnd_font.id = dst; + src_font->id = dst; } if (src == fk->last_id) update_last_id (fk); Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 36702) +++ trunk/src/font.h (revision 36703) @@ -53,7 +53,6 @@ /* Look up font. If not found: return NULL (fallback=0), or return the default font (fallback=1) */ -pcb_font_t *pcb_font_old(pcb_board_t *pcb, rnd_font_id_t id, int fallback); rnd_font_t *pcb_font(pcb_board_t *pcb, rnd_font_id_t id, int fallback); void pcb_font_create_default(pcb_board_t *pcb); Index: trunk/src/font_act.c =================================================================== --- trunk/src/font_act.c (revision 36702) +++ trunk/src/font_act.c (revision 36703) @@ -56,7 +56,7 @@ rnd_message(RND_MSG_ERROR, "LoadFontFrom(): when second argument is present, it must be an integer\n"); return 1; } - if (pcb_font_old(PCB_ACT_BOARD, fid, 0) != NULL) { /* font already exists */ + if (pcb_font(PCB_ACT_BOARD, fid, 0) != NULL) { /* font already exists */ dst_fid = fid; fid = -1; /* allocate a new id, which will be later moved to dst_fid */ } Index: trunk/src/global_typedefs.h =================================================================== --- trunk/src/global_typedefs.h (revision 36702) +++ trunk/src/global_typedefs.h (revision 36703) @@ -40,7 +40,6 @@ typedef struct pcb_net_term_s pcb_net_term_t; typedef struct pcb_oldnet_s pcb_oldnet_t; typedef struct pcb_connection_s pcb_connection_t; -typedef struct pcb_font_s pcb_font_t; typedef struct pcb_fontkit_s pcb_fontkit_t; typedef struct pcb_line_s pcb_line_t; typedef struct pcb_arc_s pcb_arc_t; Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 36702) +++ trunk/src/obj_text.c (revision 36703) @@ -453,7 +453,7 @@ unsigned char *rendered = pcb_text_render_str(Text); double scx, scy; rnd_coord_t min_line_width; - pcb_font_t *font = pcb_font_old(PCB, Text->fid, 1); + rnd_font_t *font = pcb_font(PCB, Text->fid, 1); /* Calculate the bounding box based on the larger of the thicknesses * the text might clamped at on silk or copper layers. */ @@ -460,7 +460,7 @@ min_line_width = MAX(conf_core.design.min_wid, conf_core.design.min_slk); pcb_text_get_scale_xy(Text, &scx, &scy); - rnd_font_string_bbox_pcb_rnd(cx, cy, &font->rnd_font, rendered, Text->X, Text->Y, scx, scy, Text->rot, text_mirror_bits(Text), Text->thickness, min_line_width, Text->Scale); + rnd_font_string_bbox_pcb_rnd(cx, cy, font, rendered, Text->X, Text->Y, scx, scy, Text->rot, text_mirror_bits(Text), Text->thickness, min_line_width, Text->Scale); pcb_text_free_str(Text, rendered); /* rnd_trace("orig %mm %mm %mm %mm\n", Text->bbox_naked.X1, Text->bbox_naked.Y1, Text->bbox_naked.X2, Text->bbox_naked.Y2);*/