# HG changeset patch # User ib # Date 1395875874 0 # Node ID 896b8c73943e6fd17d6910b04dc9be044568d985 # Parent 3bc23ae2a15452d45946133e659b479eb70a4d5d Cosmetic: Rename fntChar members for width and height. diff -r 3bc23ae2a154 -r 896b8c73943e gui/skin/font.c --- a/gui/skin/font.c Wed Mar 26 19:23:38 2014 +0000 +++ b/gui/skin/font.c Wed Mar 26 23:17:54 2014 +0000 @@ -71,8 +71,8 @@ for (i = 0; i < ASCII_CHRS + EXTRA_CHRS; i++) { Fonts[id]->Fnt[i].x = -1; Fonts[id]->Fnt[i].y = -1; - Fonts[id]->Fnt[i].sx = -1; - Fonts[id]->Fnt[i].sy = -1; + Fonts[id]->Fnt[i].w = -1; + Fonts[id]->Fnt[i].h = -1; } return id; @@ -167,12 +167,12 @@ Fonts[id]->Fnt[i].y = atoi(buf); cutItem(param, buf, ',', 2); - Fonts[id]->Fnt[i].sx = atoi(buf); + Fonts[id]->Fnt[i].w = atoi(buf); cutItem(param, buf, ',', 3); - Fonts[id]->Fnt[i].sy = atoi(buf); + Fonts[id]->Fnt[i].h = atoi(buf); - mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[font] char: '%s' params: %d,%d %dx%d\n", item, Fonts[id]->Fnt[i].x, Fonts[id]->Fnt[i].y, Fonts[id]->Fnt[i].sx, Fonts[id]->Fnt[i].sy); + mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[font] char: '%s' params: %d,%d %dx%d\n", item, Fonts[id]->Fnt[i].x, Fonts[id]->Fnt[i].y, Fonts[id]->Fnt[i].w, Fonts[id]->Fnt[i].h); } else if (!strcmp(item, "image")) { av_strlcpy(buf, path, sizeof(buf)); av_strlcat(buf, param, sizeof(buf)); @@ -285,11 +285,11 @@ while (*p) { c = fntGetCharIndex(id, &p, utf8, 1); - if (c == -1 || Fonts[id]->Fnt[c].sx == -1) + if (c == -1 || Fonts[id]->Fnt[c].w == -1) c = ' '; - if (Fonts[id]->Fnt[c].sx != -1) - size += Fonts[id]->Fnt[c].sx; + if (Fonts[id]->Fnt[c].w != -1) + size += Fonts[id]->Fnt[c].w; } return size; @@ -315,10 +315,10 @@ while (*p) { c = fntGetCharIndex(id, &p, utf8, 1); - if (c == -1 || Fonts[id]->Fnt[c].sx == -1) + if (c == -1 || Fonts[id]->Fnt[c].w == -1) c = ' '; - h = Fonts[id]->Fnt[c].sy; + h = Fonts[id]->Fnt[c].h; if (h > max) max = h; @@ -407,17 +407,17 @@ c = fntGetCharIndex(id, &u, utf8, 1); if (c != -1) - fw = Fonts[id]->Fnt[c].sx; + fw = Fonts[id]->Fnt[c].w; if (c == -1 || fw == -1) { c = ' '; - fw = Fonts[id]->Fnt[c].sx; + fw = Fonts[id]->Fnt[c].w; } if (fw == -1) continue; - fh = Fonts[id]->Fnt[c].sy; + fh = Fonts[id]->Fnt[c].h; fyc = Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; yc = dx; @@ -443,17 +443,17 @@ c = fntGetCharIndex(id, &u, utf8, -1); if (c != -1) - fw = Fonts[id]->Fnt[c].sx; + fw = Fonts[id]->Fnt[c].w; if (c == -1 || fw == -1) { c = ' '; - fw = Fonts[id]->Fnt[c].sx; + fw = Fonts[id]->Fnt[c].w; } if (fw == -1) continue; - fh = Fonts[id]->Fnt[c].sy; + fh = Fonts[id]->Fnt[c].h; fyc = Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; dx -= fw; diff -r 3bc23ae2a154 -r 896b8c73943e gui/skin/font.h --- a/gui/skin/font.h Wed Mar 26 19:23:38 2014 +0000 +++ b/gui/skin/font.h Wed Mar 26 23:17:54 2014 +0000 @@ -30,7 +30,7 @@ typedef struct { int x, y; // location - int sx, sy; // size + int w, h; // size } fntChar; typedef struct {