Skip to content
Browse files

FontMods can go away

They were not used anyway.
  • Loading branch information...
1 parent 56c9e9c commit f2d516968ce1215f046dd560e88ef560ad56e21d @khaledhosny khaledhosny committed Sep 13, 2012
View
10 fontforge/bdfinfo.c
@@ -500,19 +500,19 @@ static void BdfP_Expose(struct bdf_dlg *bd, GWindow pixmap) {
GDrawFillRect(pixmap,&r,ACTIVE_BORDER);
}
GDrawPushClip(pixmap,&clip,&old);
- GDrawDrawText8(pixmap,4,i*(bd->fh+1)+bd->as,bdf->props[i+cur->top_prop].name,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,4,i*(bd->fh+1)+bd->as,bdf->props[i+cur->top_prop].name,-1,MAIN_FOREGROUND);
GDrawPopClip(pixmap,&old);
switch ( bdf->props[i+cur->top_prop].type&~prt_property ) {
case prt_string: case prt_atom:
- GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,bdf->props[i+cur->top_prop].u.str,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,bdf->props[i+cur->top_prop].u.str,-1,MAIN_FOREGROUND);
break;
case prt_int:
sprintf( buffer, "%d", bdf->props[i+cur->top_prop].u.val );
- GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,buffer,-1,MAIN_FOREGROUND);
break;
case prt_uint:
sprintf( buffer, "%u", (unsigned) bdf->props[i+cur->top_prop].u.val );
- GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,bd->value_x+2,i*(bd->fh+1)+bd->as,buffer,-1,MAIN_FOREGROUND);
break;
}
GDrawDrawLine(pixmap,0,i*(bd->fh+1)+bd->fh,bd->vwidth,i*(bd->fh+1)+bd->fh,0x808080);
@@ -534,7 +534,7 @@ static void BdfP_Expose(struct bdf_dlg *bd, GWindow pixmap) {
/* GT: word is used for the latin script and the latin language) and that you, as */
/* GT: a translator may need to ask me to disambiguate more strings. Please do so: */
/* GT: <pfaedit@users.sourceforge.net> */
- GDrawDrawText8(pixmap,4,i*(bd->fh+1)+bd->as,S_("Property|New..."),-1,NULL,0xff0000);
+ GDrawDrawText8(pixmap,4,i*(bd->fh+1)+bd->as,S_("Property|New..."),-1,0xff0000);
GDrawDrawLine(pixmap,0,i*(bd->fh+1)+bd->fh,bd->vwidth,i*(bd->fh+1)+bd->fh, _ggadget_Default_Box.border_darker);
}
GDrawDrawLine(pixmap,bd->value_x,0,bd->value_x,bd->vheight, _ggadget_Default_Box.border_darker);
View
4 fontforge/bitmapview.c
@@ -799,12 +799,12 @@ static void BVInfoDrawText(BitmapView *bv, GWindow pixmap ) {
sprintf(buffer,"%d%s%d", bv->info_x, coord_sep, bv->info_y );
buffer[11] = '\0';
- GDrawDrawText8(pixmap,bv->infoh+RPT_DATA,ybase,buffer,-1,NULL,GDrawGetDefaultForeground(NULL));
+ GDrawDrawText8(pixmap,bv->infoh+RPT_DATA,ybase,buffer,-1,GDrawGetDefaultForeground(NULL));
if ( bv->active_tool!=cvt_none ) {
sprintf(buffer,"%d%s%d", bv->info_x-bv->pressed_x, coord_sep, bv->info_y-bv->pressed_y );
buffer[11] = '\0';
- GDrawDrawText8(pixmap,bv->infoh+RPT_DATA,ybase+bv->sfh+10,buffer,-1,NULL,GDrawGetDefaultForeground(NULL));
+ GDrawDrawText8(pixmap,bv->infoh+RPT_DATA,ybase+bv->sfh+10,buffer,-1,GDrawGetDefaultForeground(NULL));
}
}
View
98 fontforge/charview.c
@@ -345,7 +345,7 @@ return;
sprintf(buf,"%5.4f",len);
utf82u_strcpy(ubuf,buf);
- GDrawDrawText(pixmap,x,y,ubuf,-1,NULL,0xFF0000);
+ GDrawDrawText(pixmap,x,y,ubuf,-1,0xFF0000);
}
prev_rect = rect;
}
@@ -684,7 +684,7 @@ return;
pnum = sp->nextcpindex;
if ( pnum!=0xffff && pnum!=0xfffe ) {
sprintf( buf,"%d", pnum );
- GDrawDrawText8(pixmap,cx,cy-6,buf,-1,NULL,nextcpcol);
+ GDrawDrawText8(pixmap,cx,cy-6,buf,-1,nextcpcol);
}
}
}
@@ -781,7 +781,7 @@ return;
else {
sprintf( buf,"%d", sp->ttfindex );
}
- GDrawDrawText8(pixmap,x,y-6,buf,-1,NULL,col);
+ GDrawDrawText8(pixmap,x,y-6,buf,-1,col);
}
if ( truetype_markup && sp->roundx ) {
r.x = x-5; r.y = y-5;
@@ -1089,7 +1089,7 @@ return;
tr.x += 2;
} else if ( dy==0 ) {
/* Horizontal line */
- tr.x = cv->width - cv->nfh - GDrawGetText8Width(pixmap,ss->contour_name,-1,NULL);
+ tr.x = cv->width - cv->nfh - GDrawGetText8Width(pixmap,ss->contour_name,-1);
} else {
/* y = slope*x + off; */
slope = (sp1->me.y-sp2->me.y)/(sp1->me.x-sp2->me.x);
@@ -1103,16 +1103,16 @@ return;
tr.x = xinter+2;
tr.y = cv->nfh;
} else if ( yinter>0 && yinter<cv->height ) {
- tr.x = cv->width - cv->nfh - GDrawGetText8Width(pixmap,ss->contour_name,-1,NULL);
+ tr.x = cv->width - cv->nfh - GDrawGetText8Width(pixmap,ss->contour_name,-1);
tr.y = yinter;
}
}
} else {
tr.y -= cv->nfh/2;
- tr.x -= GDrawGetText8Width(pixmap,ss->contour_name,-1,NULL)/2;
+ tr.x -= GDrawGetText8Width(pixmap,ss->contour_name,-1)/2;
}
- GDrawDrawText8(pixmap,tr.x,tr.y,ss->contour_name,-1,NULL,fg);
+ GDrawDrawText8(pixmap,tr.x,tr.y,ss->contour_name,-1,fg);
GDrawSetFont(pixmap,cv->small); /* For point numbers */
}
@@ -1554,14 +1554,14 @@ return;
if ( first>-20 && first<cv->height+20 ) {
dtos( buf, blues[i]);
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
- GDrawDrawText8(pixmap,cv->width-len-5,first-3,buf,-1,NULL,hintlabelcol);
+ len = GDrawGetText8Width(pixmap,buf,-1);
+ GDrawDrawText8(pixmap,cv->width-len-5,first-3,buf,-1,hintlabelcol);
} else
len = 0;
if ( other>-20 && other<cv->height+20 ) {
dtos( buf, blues[i+1]-blues[i]);
- len2 = GDrawGetText8Width(pixmap,buf,-1,NULL);
- GDrawDrawText8(pixmap,cv->width-len-5-len2-5,other+cv->sas-3,buf,-1,NULL,hintlabelcol);
+ len2 = GDrawGetText8Width(pixmap,buf,-1);
+ GDrawDrawText8(pixmap,cv->width-len-5-len2-5,other+cv->sas-3,buf,-1,hintlabelcol);
}
}
}
@@ -1631,8 +1631,8 @@ static void CVShowHints(CharView *cv, GWindow pixmap) {
r.y += ( hint->width>0 ) ? -3 : cv->sas+3;
if ( r.y>-20 && r.y<cv->height+20 ) {
dtos( buf, hint->start);
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
- GDrawDrawText8(pixmap,cv->width-len-5,r.y,buf,-1,NULL,hintlabelcol);
+ len = GDrawGetText8Width(pixmap,buf,-1);
+ GDrawDrawText8(pixmap,cv->width-len-5,r.y,buf,-1,hintlabelcol);
} else
len = 0;
r.y = -cv->yoff + cv->height - rint((hint->start+hint->width)*cv->scale);
@@ -1644,8 +1644,8 @@ static void CVShowHints(CharView *cv, GWindow pixmap) {
dtos(buf+2, hint->width);
} else
dtos( buf, hint->width);
- len2 = GDrawGetText8Width(pixmap,buf,-1,NULL);
- GDrawDrawText8(pixmap,cv->width-len-5-len2-5,r.y,buf,-1,NULL,hintlabelcol);
+ len2 = GDrawGetText8Width(pixmap,buf,-1);
+ GDrawDrawText8(pixmap,cv->width-len-5-len2-5,r.y,buf,-1,hintlabelcol);
}
}
}
@@ -1685,9 +1685,9 @@ static void CVShowHints(CharView *cv, GWindow pixmap) {
r.x = cv->xoff + rint(hint->start*cv->scale);
if ( r.x>-60 && r.x<cv->width+20 ) {
dtos( buf, hint->start);
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
r.x += ( hint->width>0 ) ? 3 : -len-3;
- GDrawDrawText8(pixmap,r.x,cv->sas+3,buf,-1,NULL,hintlabelcol);
+ GDrawDrawText8(pixmap,r.x,cv->sas+3,buf,-1,hintlabelcol);
}
r.x = cv->xoff + rint((hint->start+hint->width)*cv->scale);
if ( r.x>-60 && r.x<cv->width+20 ) {
@@ -1697,9 +1697,9 @@ static void CVShowHints(CharView *cv, GWindow pixmap) {
dtos(buf+2, hint->width);
} else
dtos( buf, hint->width);
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
r.x += ( hint->width>0 ) ? -len-3 : 3;
- GDrawDrawText8(pixmap,r.x,cv->sas+cv->sfh+3,buf,-1,NULL,hintlabelcol);
+ GDrawDrawText8(pixmap,r.x,cv->sas+cv->sfh+3,buf,-1,hintlabelcol);
}
}
}
@@ -1887,12 +1887,12 @@ static void DrawVLine(CharView *cv,GWindow pixmap,real pos,Color fg, int flags,
if ( flags&1 ) {
dtos( buf, pos);
GDrawSetFont(pixmap,cv->small);
- GDrawDrawText8(pixmap,x+5,cv->sas+3,buf,-1,NULL,metricslabelcol);
+ GDrawDrawText8(pixmap,x+5,cv->sas+3,buf,-1,metricslabelcol);
if ( lock!=NULL )
GDrawDrawImage(pixmap,lock,NULL,x+5,3+cv->sfh);
}
if ( name!=NULL )
- GDrawDrawText8(pixmap,x+5,cv->sas+cv->sfh*(1+lock!=NULL)+3,name,-1,NULL,metricslabelcol);
+ GDrawDrawText8(pixmap,x+5,cv->sas+cv->sfh*(1+lock!=NULL)+3,name,-1,metricslabelcol);
}
if ( ItalicConstrained && cv->b.sc->parent->italicangle!=0 ) {
double t = tan(-cv->b.sc->parent->italicangle*3.1415926535897932/180.);
@@ -2208,8 +2208,8 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x,y,x-4,y-4,metricslabelcol);
DrawPLine(cv,pixmap,x,y,x-4,y+4,metricslabelcol);
dtos( buf, bounds[0]->x);
- x = cv->xoff + (x-cv->xoff-GDrawGetText8Width(pixmap,buf,-1,NULL))/2;
- GDrawDrawText8(pixmap,x,y-4,buf,-1,NULL,metricslabelcol);
+ x = cv->xoff + (x-cv->xoff-GDrawGetText8Width(pixmap,buf,-1))/2;
+ GDrawDrawText8(pixmap,x,y-4,buf,-1,metricslabelcol);
}
if ( sc->width != bounds[1]->x ) {
@@ -2223,8 +2223,8 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x2,y,x2-4,y-4,metricslabelcol);
DrawPLine(cv,pixmap,x2,y,x2-4,y+4,metricslabelcol);
dtos( buf, sc->width-bounds[1]->x);
- x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1,NULL))/2;
- GDrawDrawText8(pixmap,x,y-4,buf,-1,NULL,metricslabelcol);
+ x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1))/2;
+ GDrawDrawText8(pixmap,x,y-4,buf,-1,metricslabelcol);
}
if ( ItalicConstrained && cv->b.sc->parent->italicangle!=0 ) {
double t = tan(-cv->b.sc->parent->italicangle*3.1415926535897932/180.);
@@ -2247,8 +2247,8 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x2,y,x2-4,y-4,italiccoordcol);
DrawPLine(cv,pixmap,x2,y,x2-4,y+4,italiccoordcol);
dtos( buf, leftmost->me.x-leftmost->me.y*t);
- x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1,NULL))/2;
- GDrawDrawText8(pixmap,x,y+12,buf,-1,NULL,italiccoordcol);
+ x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1))/2;
+ GDrawDrawText8(pixmap,x,y+12,buf,-1,italiccoordcol);
}
if ( rightmost!=NULL ) {
x = rint(rightmost->me.x*cv->scale) + cv->xoff;
@@ -2261,8 +2261,8 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x2,y,x2-4,y-4,italiccoordcol);
DrawPLine(cv,pixmap,x2,y,x2-4,y+4,italiccoordcol);
dtos( buf, sc->width+rightmost->me.y*t-rightmost->me.x);
- x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1,NULL))/2;
- GDrawDrawText8(pixmap,x,y+12,buf,-1,NULL,italiccoordcol);
+ x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1))/2;
+ GDrawDrawText8(pixmap,x,y+12,buf,-1,italiccoordcol);
}
}
}
@@ -2280,7 +2280,7 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x,y2,x-4,y2+4,metricslabelcol);
dtos( buf, bounds[2]->y-sc->parent->descent);
y = y + (y-y2-cv->sfh)/2;
- GDrawDrawText8(pixmap,x+4,y,buf,-1,NULL,metricslabelcol);
+ GDrawDrawText8(pixmap,x+4,y,buf,-1,metricslabelcol);
x = rint(bounds[3]->x*cv->scale) + cv->xoff;
y = cv->height-cv->yoff-rint(bounds[3]->y*cv->scale);
@@ -2292,8 +2292,8 @@ return; /* no points. no side bearings */
DrawPLine(cv,pixmap,x,y2,x+4,y2+4,metricslabelcol);
DrawPLine(cv,pixmap,x,y2,x-4,y2+4,metricslabelcol);
dtos( buf, sc->vwidth-bounds[3]->y);
- x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1,NULL))/2;
- GDrawDrawText8(pixmap,x,y-4,buf,-1,NULL,metricslabelcol);
+ x = x + (x2-x-GDrawGetText8Width(pixmap,buf,-1))/2;
+ GDrawDrawText8(pixmap,x,y-4,buf,-1,metricslabelcol);
}
}
@@ -2530,8 +2530,8 @@ static void CVExpose(CharView *cv, GWindow pixmap, GEvent *event ) {
if ( y>-40 && y<cv->height+40 ) {
dtos( buf, cv->b.sc->vwidth);
GDrawSetFont(pixmap,cv->small);
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
- GDrawDrawText8(pixmap,cv->width-len-5,y,buf,-1,NULL,metricslabelcol);
+ len = GDrawGetText8Width(pixmap,buf,-1);
+ GDrawDrawText8(pixmap,cv->width-len-5,y,buf,-1,metricslabelcol);
}
}
if ( cv->showsidebearings && cv->showfore &&
@@ -2876,8 +2876,8 @@ static GWindow CharIcon(CharView *cv, FontView *fv) {
GDrawSetFont(icon,font);
text[0] = sc->unicodeenc; text[1] = 0;
GDrawWindowFontMetrics(icon,font,&as,&ds,&ld);
- width = GDrawGetTextWidth(icon,text,1,NULL);
- GDrawDrawText(icon,(r.width-width)/2,(r.height-as-ds)/2+as,text,1,NULL,0xffffff);
+ width = GDrawGetTextWidth(icon,text,1);
+ GDrawDrawText(icon,(r.width-width)/2,(r.height-as-ds)/2+as,text,1,0xffffff);
}
return( icon );
}
@@ -3299,13 +3299,13 @@ void CVInfoDrawText(CharView *cv, GWindow pixmap ) {
else
sprintf(buffer,"%.4g%s%.4g", (double) cv->info.x, coord_sep, (double) cv->info.y );
buffer[11] = '\0';
- GDrawDrawText8(pixmap,RPT_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,RPT_DATA,ybase,buffer,-1,fg);
}
if ( cv->scale>=.25 )
sprintf( buffer, "%d%%", (int) (100*cv->scale));
else
sprintf( buffer, "%.3g%%", (double) (100*cv->scale));
- GDrawDrawText8(pixmap,MAG_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,MAG_DATA,ybase,buffer,-1,fg);
const int layernamesz = 100;
char layername[layernamesz+1];
@@ -3324,14 +3324,14 @@ void CVInfoDrawText(CharView *cv, GWindow pixmap ) {
/* GT: Foreground, make it short */
_("Fore") ),
layername );
- GDrawDrawText8(pixmap,LAYER_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,LAYER_DATA,ybase,buffer,-1,fg);
if ( cv->coderange!=cr_none ) {
GDrawDrawText8(pixmap,CODERANGE_DATA,ybase,
cv->coderange==cr_fpgm ? _("'fpgm'") :
cv->coderange==cr_prep ? _("'prep'") : _("Glyph"),
- -1,NULL,fg);
+ -1,fg);
GDrawDrawText8(pixmap,CODERANGE_DATA+40,ybase,
- FreeTypeStringVersion(), -1,NULL,fg);
+ FreeTypeStringVersion(), -1,fg);
}
sp = NULL; cp = NULL;
if ( cv->b.sc->inspiro && hasspiro())
@@ -3368,7 +3368,7 @@ void CVInfoDrawText(CharView *cv, GWindow pixmap ) {
else
sprintf(buffer,"%.4g%s%.4g", (double) selx, coord_sep, (double) sely );
buffer[11] = '\0';
- GDrawDrawText8(pixmap,SPT_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,SPT_DATA,ybase,buffer,-1,fg);
} else if ( cv->widthsel && cv->info_within ) {
xdiff = cv->info.x-cv->p.cx;
ydiff = 0;
@@ -3392,14 +3392,14 @@ return;
else
sprintf(buffer,"%.4g%s%.4g", (double) xdiff, coord_sep, (double) ydiff );
buffer[11] = '\0';
- GDrawDrawText8(pixmap,SOF_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,SOF_DATA,ybase,buffer,-1,fg);
sprintf( buffer, "%.1f", sqrt(xdiff*xdiff+ydiff*ydiff));
- GDrawDrawText8(pixmap,SDS_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,SDS_DATA,ybase,buffer,-1,fg);
/* Utf-8 for degree sign */
sprintf( buffer, "%d\302\260", (int) rint(180*atan2(ydiff,xdiff)/3.1415926535897932));
- GDrawDrawText8(pixmap,SAN_DATA,ybase,buffer,-1,NULL,fg);
+ GDrawDrawText8(pixmap,SAN_DATA,ybase,buffer,-1,fg);
}
static void CVInfoDrawRulers(CharView *cv, GWindow pixmap ) {
@@ -4643,13 +4643,13 @@ static void CVDrawNum(CharView *UNUSED(cv),GWindow pixmap,int x, int y, char *fo
if ( val==0 ) val=0; /* avoid -0 */
sprintf(buffer,format,(double)val); /* formats are given as for doubles */
if ( align!=0 ) {
- len = GDrawGetText8Width(pixmap,buffer,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buffer,-1);
if ( align==1 )
x-=len/2;
else
x-=len;
}
- GDrawDrawText8(pixmap,x,y,buffer,-1,NULL,GDrawGetDefaultForeground(NULL));
+ GDrawDrawText8(pixmap,x,y,buffer,-1,GDrawGetDefaultForeground(NULL));
}
static void CVDrawVNum(CharView *cv,GWindow pixmap,int x, int y, char *format,real val, int align) {
@@ -4666,7 +4666,7 @@ static void CVDrawVNum(CharView *cv,GWindow pixmap,int x, int y, char *format,re
y-=len;
}
for ( pt=buffer; *pt; ++pt ) {
- GDrawDrawText8(pixmap,x,y,pt,1,NULL,GDrawGetDefaultForeground(NULL));
+ GDrawDrawText8(pixmap,x,y,pt,1,GDrawGetDefaultForeground(NULL));
y += cv->sdh;
}
}
@@ -10483,7 +10483,7 @@ static void _CharViewCreate(CharView *cv, SplineChar *sc, FontView *fv,int enc)
GDrawWindowFontMetrics(cv->gw,cv->small,&as,&ds,&ld);
cv->sfh = as+ds; cv->sas = as;
GDrawSetFont(cv->gw,cv->small);
- GDrawGetText8Bounds(cv->gw,"0123456789",10,NULL,&textbounds);
+ GDrawGetText8Bounds(cv->gw,"0123456789",10,&textbounds);
cv->sdh = textbounds.as+textbounds.ds+1;
rq.point_size = 10;
cv->normal = GDrawInstanciateFont(cv->gw,&rq);
View
2 fontforge/combinations.c
@@ -518,7 +518,7 @@ static void KP_ExposeKerns(KPData *kpd,GWindow pixmap,GRect *rect) {
sprintf( buffer, "%d,%d ", kern->newoff, kern->newyoff );
if ( kern->ac!=NULL )
strncat(buffer,kern->ac->name,sizeof(buffer)-strlen(buffer)-1);
- GDrawDrawText8(pixmap,15,subclip.y+kpd->uh-kpd->fh+kpd->as,buffer,-1,NULL,
+ GDrawDrawText8(pixmap,15,subclip.y+kpd->uh-kpd->fh+kpd->as,buffer,-1,
kern->kp!=NULL && kern->newoff!=kern->kp->off ? 0xff0000 : 0x000000 );
if ( i+kpd->off_top==kpd->selected ) {
sel.x = 0; sel.width = kpd->vwidth-1;
View
2 fontforge/contextchain.c
@@ -2385,7 +2385,7 @@ void ContextChainEdit(SplineFont *sf,FPST *fpst,
GDrawSetFont(ccd->glyphs_simple,_ggadget_default_font);
}
extrabuttonsgcd[i].gd.pos.width = GDrawPixelsToPoints(ccd->glyphs_simple,
- GDrawGetText8Width(ccd->glyphs_simple,(char *)extrabuttonslab[i].text,-1,NULL))+50;
+ GDrawGetText8Width(ccd->glyphs_simple,(char *)extrabuttonslab[i].text,-1))+50;
extrabuttonsgcd[i].gd.cid = CID_GAddLookup;
extrabuttonsgcd[i].gd.handle_controlevent = CCD_AddLookup;
extrabuttonsgcd[i++].creator = GListButtonCreate;
View
70 fontforge/cvdebug.c
@@ -167,55 +167,55 @@ static void DVRegExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
y = 3+dv->ii.as - dv->reg_offtop*dv->ii.fh;
if ( exc==NULL ) {
- GDrawDrawText8(pixmap,3,y,"<not running>",-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,"<not running>",-1,MAIN_FOREGROUND);
return;
}
sprintf( buffer, " rp0: %d", exc->GS.rp0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, " rp1: %d", exc->GS.rp1 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, " rp2: %d", exc->GS.rp2 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "loop: %ld", exc->GS.loop );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
y+=2;
sprintf( buffer, " zp0: %s", exc->GS.gep0?"Normal":"Twilight" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, " zp1: %s", exc->GS.gep1?"Normal":"Twilight" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, " zp2: %s", exc->GS.gep2?"Normal":"Twilight" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
y+=2;
sprintf( buffer, "MinDist: %.2f", exc->GS.minimum_distance/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "CvtCutin: %.2f", exc->GS.control_value_cutin/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "SingWidCut: %.2f", exc->GS.single_width_cutin/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "SingWidVal: %.2f", exc->GS.single_width_value/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
y+=2;
sprintf( buffer, "freeVec: %g,%g", (((int)exc->GS.freeVector.x<<16)>>(16+14)) + ((exc->GS.freeVector.x&0x3fff)/16384.0),
(((int)exc->GS.freeVector.y<<16)>>(16+14)) + ((exc->GS.freeVector.y&0x3fff)/16384.0) );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "projVec: %g,%g", (((int)exc->GS.projVector.x<<16)>>(16+14)) + ((exc->GS.projVector.x&0x3fff)/16384.0),
(((int)exc->GS.projVector.y<<16)>>(16+14)) + ((exc->GS.projVector.y&0x3fff)/16384.0) );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "dualVec: %g,%g", (((int)exc->GS.dualVector.x<<16)>>(16+14)) + ((exc->GS.dualVector.x&0x3fff)/16384.0),
(((int)exc->GS.dualVector.y<<16)>>(16+14)) + ((exc->GS.dualVector.y&0x3fff)/16384.0) );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
y+=2;
sprintf( buffer, "AutoFlip: %s", exc->GS.auto_flip?"True": "False" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "DeltaBase: %d", exc->GS.delta_base );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "DeltaShift: %d", exc->GS.delta_shift );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "RndState: %s",
exc->GS.round_state==TT_Round_To_Half_Grid? "To Half Grid" :
exc->GS.round_state==TT_Round_To_Grid? "To Grid" :
@@ -226,25 +226,25 @@ return;
exc->GS.round_state==TT_Round_Super? "Super" :
exc->GS.round_state==TT_Round_Super_45? "Super45" :
"Unknown" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "SRndPeriod: %.2f", exc->period/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "SRndPhase: %.2f", exc->phase/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "SRndThreshold: %.2f", exc->threshold/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "InstrControl: %d", exc->GS.instruct_control );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "ScanControl: %s", exc->GS.scan_control?"True": "False" );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
sprintf( buffer, "ScanType: %d", exc->GS.scan_type );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
/* Instruction control, scan control, scan type, phase, threshold for super rounding */
y += 2;
sprintf( buffer, "Pixels/Em: %d", PPEMY(exc) );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND); y += dv->ii.fh;
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND); y += dv->ii.fh;
}
static void DVStackExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
@@ -256,11 +256,11 @@ static void DVStackExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
GDrawSetFont(pixmap,dv->ii.gfont);
y = 3+dv->ii.as - dv->stack_offtop*dv->ii.fh;
if ( exc==NULL || exc->top==0 ) {
- GDrawDrawText8(pixmap,3,y,"<empty>",-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,"<empty>",-1,MAIN_FOREGROUND);
} else {
for ( i=exc->top-1; i>=0; --i ) {
sprintf(buffer, "%3d: %3ld (%.2f)", i, exc->stack[i], exc->stack[i]/64.0 );
- GDrawDrawText8(pixmap,3,y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,buffer,-1,MAIN_FOREGROUND);
if ( y>event->u.expose.rect.y+event->u.expose.rect.height )
break;
y += dv->ii.fh;
@@ -277,7 +277,7 @@ static void DVStorageExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
GDrawSetFont(pixmap,dv->ii.gfont);
y = 3+dv->ii.as - dv->storage_offtop*dv->ii.fh;
if ( exc==NULL || exc->storeSize==0 ) {
- GDrawDrawText8(pixmap,3,y,_("<empty>"),-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,_("<empty>"),-1,MAIN_FOREGROUND);
} else {
int n_watch;
uint8 *watches = DebuggerGetWatchStores(dv->dc,&n_watch);
@@ -289,7 +289,7 @@ static void DVStorageExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
if ( i<n_watch && watches!=NULL && watches[i] && y>0 )
GDrawDrawImage(pixmap,&GIcon_Stop,NULL,3,
y-dv->ii.as-2);
- GDrawDrawText8(pixmap,23,y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,23,y,buffer,-1,MAIN_FOREGROUND);
if ( y>event->u.expose.rect.y+event->u.expose.rect.height )
break;
y += dv->ii.fh;
@@ -306,7 +306,7 @@ static void DVCvtExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
GDrawSetFont(pixmap,dv->ii.gfont);
y = 3+dv->ii.as;
if ( exc==NULL || exc->cvtSize==0 ) {
- GDrawDrawText8(pixmap,3,y,_("<empty>"),-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,_("<empty>"),-1,MAIN_FOREGROUND);
} else {
int n_watch;
uint8 *watches = DebuggerGetWatchCvts(dv->dc,&n_watch);
@@ -316,7 +316,7 @@ static void DVCvtExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
if ( dv->cvt_offtop+i<n_watch && watches!=NULL && watches[dv->cvt_offtop+i] && y>0 )
GDrawDrawImage(pixmap,&GIcon_Stop,NULL,3,
y-dv->ii.as-2);
- GDrawDrawText8(pixmap,23,y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,23,y,buffer,-1,MAIN_FOREGROUND);
if ( y>event->u.expose.rect.y+event->u.expose.rect.height )
break;
y += dv->ii.fh;
@@ -410,7 +410,7 @@ static void DVPointsVExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
else
sprintf(buffer, " : I %g,%g", (double) me.x , (double) me.y );
if ( y>0 )
- GDrawDrawText8(pixmap,3+19,y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3+19,y,buffer,-1,MAIN_FOREGROUND);
y += dv->ii.fh;
}
if ( r->contours!=NULL && i==r->contours[c] ) { /* No contours in twilight */
@@ -437,14 +437,14 @@ static void DVPointsVExpose(GWindow pixmap,DebugView *dv,GEvent *event) {
r->tags[i]&FT_Curve_Tag_On?'P':'C', r->tags[i]&FT_Curve_Tag_Touch_X?'X':' ', r->tags[i]&FT_Curve_Tag_Touch_Y?'Y':' ',
(double) me.x, (double) me.y );
if ( y>0 )
- GDrawDrawText8(pixmap,3+19,y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3+19,y,buffer,-1,MAIN_FOREGROUND);
if ( y>event->u.expose.rect.y+event->u.expose.rect.height )
break;
y += dv->ii.fh;
}
}
if ( n==0 ) {
- GDrawDrawText8(pixmap,3,y,_("<none>"),-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,3,y,_("<none>"),-1,MAIN_FOREGROUND);
}
}
View
2 fontforge/cvdgloss.c
@@ -98,7 +98,7 @@ static void scrprintf(struct scr *scr, char *format, ... ) {
va_start(ap,format);
vsnprintf(buffer,sizeof(buffer),format,ap);
- GDrawDrawText8(scr->pixmap,3,scr->y,buffer,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(scr->pixmap,3,scr->y,buffer,-1,MAIN_FOREGROUND);
scr->y += scr->fh;
++scr->lines;
}
View
14 fontforge/cvpalettes.c
@@ -851,7 +851,7 @@ static void ToolsExpose(GWindow pixmap, CharView *cv, GRect *r) {
temp.x = 52-16; temp.y = i*27; temp.width = 16; temp.height = 4*12;
GDrawFillRect(pixmap,&temp,GDrawGetDefaultBackground(NULL));
for ( j=0; j<4; ++j ) {
- GDrawDrawText(pixmap,2,i*27+j*12+10,(unichar_t *) _Mouse[j],-1,NULL,GDrawGetDefaultForeground(NULL));
+ GDrawDrawText(pixmap,2,i*27+j*12+10,(unichar_t *) _Mouse[j],-1,GDrawGetDefaultForeground(NULL));
if ( (&cv->b1_tool)[j]!=cvt_none )
GDrawDrawImage(pixmap,smalls[(&cv->b1_tool)[j]],NULL,52-16,i*27+j*12);
}
@@ -1382,7 +1382,7 @@ return;
if ( i==0 || i==1 ) {
str = i==0?_("Guide") : _("Back");
GDrawDrawText8(pixmap,r.x+2,CV_LAYERS2_HEADER_HEIGHT + i*CV_LAYERS2_LINE_HEIGHT + (CV_LAYERS2_LINE_HEIGHT-12)/2+12,
- (char *) str,-1,NULL,ll==layer2.active?0xffffff:GDrawGetDefaultForeground(NULL));
+ (char *) str,-1,ll==layer2.active?0xffffff:GDrawGetDefaultForeground(NULL));
} else if ( layer2.offtop+i>=layer2.current_layers ) {
break;
} else if ( layer2.layers[layer2.offtop+i]!=NULL ) {
@@ -1897,7 +1897,7 @@ return;
}
str = ( ll>=0 && ll<cv->b.sc->layer_cnt ? (cv->b.sc->layers[ll].order2? "Q" : "C") : " ");
GDrawDrawText8(pixmap, quadcol, y + yt,
- (char *) str,-1,NULL,GDrawGetDefaultForeground(NULL));
+ (char *) str,-1,GDrawGetDefaultForeground(NULL));
}
/* draw fg/bg toggle */
@@ -1910,7 +1910,7 @@ return;
}
str = ( ll>=0 && ll<cv->b.sc->layer_cnt ? (cv->b.sc->layers[ll].background? "B" : "F") : "#");
GDrawDrawText8(pixmap, fgcol, y + yt,
- (char *) str,-1,NULL,GDrawGetDefaultForeground(NULL));
+ (char *) str,-1,GDrawGetDefaultForeground(NULL));
}
/* draw layer thumbnail and label */
@@ -1929,7 +1929,7 @@ return;
if ( ll==-1 || ll==0 || ll==1) {
str = ll==-1 ? _("Guide") : (ll==0 ?_("Back") : _("Fore")) ;
GDrawDrawText8(pixmap,r.x+2,y + yt,
- (char *) str,-1,NULL,ll==layerinfo.active?0xffffff:GDrawGetDefaultForeground(NULL));
+ (char *) str,-1,ll==layerinfo.active?0xffffff:GDrawGetDefaultForeground(NULL));
} else if ( ll>=layerinfo.current_layers ) {
break; /* no more layers to draw! */
} else if ( ll>=0 && layerinfo.layers[ll]!=NULL ) {
@@ -1944,7 +1944,7 @@ return;
str = cv->b.sc->parent->layers[ll].name;
if ( !str || !*str ) str="-";
GDrawDrawText8(pixmap, r.x+2, y + yt,
- (char *) str,-1,NULL,ll==layerinfo.active?0xffffff:GDrawGetDefaultForeground(NULL));
+ (char *) str,-1,ll==layerinfo.active?0xffffff:GDrawGetDefaultForeground(NULL));
}
}
}
@@ -2061,7 +2061,7 @@ static void CVLCheckLayerCount(CharView *cv, int resize) {
} else if ( hasmn==NULL ) {
sprintf(namebuf,"%s", i==-1 ? _("Guide") : (i==0 ?_("Back") : _("Fore")) );
}
- width = GDrawGetText8Width(cvlayers, namebuf, -1, NULL);
+ width = GDrawGetText8Width(cvlayers, namebuf, -1);
if ( width+togsize>maxwidth ) maxwidth = width + togsize;
} else if ( i==-1 ) {
if ( width+togsize>maxwidth ) maxwidth = width + togsize;
View
16 fontforge/cvruler.c
@@ -283,9 +283,9 @@ static int ruler_e_h(GWindow gw, GEvent *event) {
GDrawSetFont(gw,cv->rfont);
/*GDrawFillRect(gw,NULL,0xe0e0c0);*/
for ( line=0; RulerText(cv,ubuf,line); ++line )
- GDrawDrawText(gw,2,line*cv->rfh+cv->ras+1,ubuf,-1,NULL,0x000000);
+ GDrawDrawText(gw,2,line*cv->rfh+cv->ras+1,ubuf,-1,0x000000);
for ( i=0; RulerTextIntersection(cv,ubuf,i); ++i )
- GDrawDrawText(gw,2,(line+i)*cv->rfh+cv->ras+1,ubuf,-1,NULL,0x000000);
+ GDrawDrawText(gw,2,(line+i)*cv->rfh+cv->ras+1,ubuf,-1,0x000000);
break;
case et_mousedown:
cv->autonomous_ruler_w = false;
@@ -441,12 +441,12 @@ static void RulerPlace(CharView *cv, GEvent *event) {
GDrawSetFont(cv->ruler_w,cv->rfont);
width = h = 0;
for ( i=0; RulerText(cv,ubuf,i); ++i ) {
- w = GDrawGetTextWidth(cv->ruler_w,ubuf,-1,NULL);
+ w = GDrawGetTextWidth(cv->ruler_w,ubuf,-1);
if ( w>width ) width = w;
h += cv->rfh;
}
for ( i=0; RulerTextIntersection(cv,ubuf,i); ++i ) {
- w = GDrawGetTextWidth(cv->ruler_w,ubuf,-1,NULL);
+ w = GDrawGetTextWidth(cv->ruler_w,ubuf,-1);
if ( w>width ) width = w;
h += cv->rfh;
}
@@ -618,14 +618,14 @@ static int cpinfo_e_h(GWindow gw, GEvent *event) {
GDrawSetFont(gw,cv->rfont);
for ( which = 1; which>=0; --which ) {
for ( line=0; PtInfoText(cv,line,which,buf,sizeof(buf))!=NULL; ++line ) {
- GDrawDrawText8(gw,2,y,buf,-1,NULL,0x000000);
+ GDrawDrawText8(gw,2,y,buf,-1,0x000000);
y += cv->rfh+1;
}
GDrawDrawLine(gw,0,y+2-cv->ras,2000,y+2-cv->ras,0x000000);
y += 4;
}
if ( PtInfoText(cv,0,-1,buf,sizeof(buf))!=NULL )
- GDrawDrawText8(gw,2,y,buf,-1,NULL,0x000000);
+ GDrawDrawText8(gw,2,y,buf,-1,0x000000);
break;
}
return( true );
@@ -673,14 +673,14 @@ static void CpInfoPlace(CharView *cv, GEvent *event) {
h = 0; width = 0;
for ( which = 0; which<2; ++which ) {
for ( line=0; PtInfoText(cv,line,which,buf,sizeof(buf))!=NULL; ++line ) {
- w = GDrawGetText8Width(cv->ruler_w,buf,-1,NULL);
+ w = GDrawGetText8Width(cv->ruler_w,buf,-1);
if ( w>width ) width = w;
h += cv->rfh+1;
}
h += 4;
}
if ( PtInfoText(cv,0,-1,buf,sizeof(buf))!=NULL ) {
- w = GDrawGetText8Width(cv->ruler_w,buf,-1,NULL);
+ w = GDrawGetText8Width(cv->ruler_w,buf,-1);
if ( w>width ) width = w;
h += cv->rfh+1;
}
View
4 fontforge/deltaui.c
@@ -844,12 +844,12 @@ static void QGDrawWindow(GWindow pixmap, QGData *qg, GEvent *e) {
if ( !where.parent->open )
GDrawDrawLine(pixmap,r.x+qg->as/2,r.y+2,r.x+qg->as/2,r.y+qg->as-2,
0x000000);
- GDrawDrawText8(pixmap,r.x+qg->fh,y,where.parent->name,-1,NULL, 0x000000);
+ GDrawDrawText8(pixmap,r.x+qg->fh,y,where.parent->name,-1, 0x000000);
} else {
QuestionableGrid *q = &where.parent->first[where.offset];
sprintf( buffer, _("\"%.40s\" size=%d point=%d (%d,%d) distance=%g"),
q->sc->name, q->size, q->nearestpt, q->x, q->y, q->distance );
- GDrawDrawText8(pixmap,2+(depth+1)*qg->fh,y,buffer,-1,NULL, 0x000000);
+ GDrawDrawText8(pixmap,2+(depth+1)*qg->fh,y,buffer,-1, 0x000000);
}
y += qg->fh;
QG_NextLine(&where);
View
8 fontforge/fontinfo.c
@@ -5607,14 +5607,14 @@ void GFI_LookupScrollbars(struct gfi_data *gfi, int isgpos, int refresh) {
if ( lk->all[i].deleted )
continue;
++lcnt;
- wmax = GDrawGetText8Width(gw,lk->all[i].lookup->lookup_name,-1,NULL);
+ wmax = GDrawGetText8Width(gw,lk->all[i].lookup->lookup_name,-1);
if ( wmax > width ) width = wmax;
if ( lk->all[i].open ) {
for ( j=0; j<lk->all[i].subtable_cnt; ++j ) {
if ( lk->all[i].subtables[j].deleted )
continue;
++lcnt;
- wmax = gfi->fh+GDrawGetText8Width(gw,lk->all[i].subtables[j].subtable->subtable_name,-1,NULL);
+ wmax = gfi->fh+GDrawGetText8Width(gw,lk->all[i].subtables[j].subtable->subtable_name,-1);
if ( wmax > width ) width = wmax;
}
}
@@ -6508,7 +6508,7 @@ static void LookupExpose(GWindow pixmap, struct gfi_data *gfi, int isgpos) {
if ( !lk->all[i].open )
GDrawDrawLine(pixmap,r.x+(r.width/2),r.y+2, r.x+(r.width/2),r.y+r.height-2, 0x000000);
GDrawDrawText8(pixmap,r.x+gfi->fh, r.y+gfi->as,
- lk->all[i].lookup->lookup_name,-1,NULL,MAIN_FOREGROUND);
+ lk->all[i].lookup->lookup_name,-1,MAIN_FOREGROUND);
}
++lcnt;
if ( lk->all[i].open ) {
@@ -6524,7 +6524,7 @@ static void LookupExpose(GWindow pixmap, struct gfi_data *gfi, int isgpos) {
r.x = LK_MARGIN+2*gfi->fh-lk->off_left;
r.y = LK_MARGIN+(lcnt-lk->off_top)*gfi->fh;
GDrawDrawText8(pixmap,r.x, r.y+gfi->as,
- lk->all[i].subtables[j].subtable->subtable_name,-1,NULL,MAIN_FOREGROUND);
+ lk->all[i].subtables[j].subtable->subtable_name,-1,MAIN_FOREGROUND);
}
++lcnt;
}
View
15 fontforge/fontview.c
@@ -5701,7 +5701,6 @@ static void FVExpose(FontView *fv,GWindow pixmap, GEvent *event) {
char utf8_buf[8];
int use_utf8 = false;
Color fg;
- FontMods *mods=NULL;
extern const int amspua[];
int uni;
struct cidmap *cidmap = NULL;
@@ -5863,13 +5862,13 @@ static void FVExpose(FontView *fv,GWindow pixmap, GEvent *event) {
} else if ( use_utf8 ) {
GTextBounds size;
if ( styles!=laststyles ) GDrawSetFont(pixmap,FVCheckFont(fv,styles));
- width = GDrawGetText8Bounds(pixmap,utf8_buf,-1,mods,&size);
+ width = GDrawGetText8Bounds(pixmap,utf8_buf,-1,&size);
if ( size.lbearing==0 && size.rbearing==0 ) {
utf8_buf[0] = 0xe0 | (0xfffd>>12);
utf8_buf[1] = 0x80 | ((0xfffd>>6)&0x3f);
utf8_buf[2] = 0x80 | (0xfffd&0x3f);
utf8_buf[3] = 0;
- width = GDrawGetText8Bounds(pixmap,utf8_buf,-1,mods,&size);
+ width = GDrawGetText8Bounds(pixmap,utf8_buf,-1,&size);
}
width = size.rbearing - size.lbearing+1;
if ( width >= fv->cbw-1 ) {
@@ -5881,14 +5880,14 @@ static void FVExpose(FontView *fv,GWindow pixmap, GEvent *event) {
/* move rotated glyph up a bit to center it */
if (styles&_uni_vertical)
y -= fv->lab_as/2;
- GDrawDrawText8(pixmap,j*fv->cbw+(fv->cbw-1-width)/2-size.lbearing,y,utf8_buf,-1,mods,fg^fgxor);
+ GDrawDrawText8(pixmap,j*fv->cbw+(fv->cbw-1-width)/2-size.lbearing,y,utf8_buf,-1,fg^fgxor);
}
if ( width >= fv->cbw-1 )
GDrawPopClip(pixmap,&old2);
laststyles = styles;
} else {
if ( styles!=laststyles ) GDrawSetFont(pixmap,FVCheckFont(fv,styles));
- width = GDrawGetTextWidth(pixmap,buf,-1,mods);
+ width = GDrawGetTextWidth(pixmap,buf,-1);
if ( width >= fv->cbw-1 ) {
GDrawPushClip(pixmap,&r,&old2);
width = fv->cbw-1;
@@ -5898,7 +5897,7 @@ static void FVExpose(FontView *fv,GWindow pixmap, GEvent *event) {
/* move rotated glyph up a bit to center it */
if (styles&_uni_vertical)
y -= fv->lab_as/2;
- GDrawDrawText(pixmap,j*fv->cbw+(fv->cbw-1-width)/2,y,buf,-1,mods,fg^fgxor);
+ GDrawDrawText(pixmap,j*fv->cbw+(fv->cbw-1-width)/2,y,buf,-1,fg^fgxor);
}
if ( width >= fv->cbw-1 )
GDrawPopClip(pixmap,&old2);
@@ -6008,8 +6007,8 @@ return;
}
}
- tlen = GDrawDrawText(pixmap,10,fv->mbh+fv->lab_as,ubuffer,ulen,NULL,fvglyphinfocol);
- GDrawDrawText(pixmap,10+tlen,fv->mbh+fv->lab_as,ubuffer+ulen,-1,NULL,fg);
+ tlen = GDrawDrawText(pixmap,10,fv->mbh+fv->lab_as,ubuffer,ulen,fvglyphinfocol);
+ GDrawDrawText(pixmap,10+tlen,fv->mbh+fv->lab_as,ubuffer+ulen,-1,fg);
GDrawPopClip(pixmap,&old);
}
View
8 fontforge/groupsdlg.c
@@ -148,9 +148,9 @@ static int _GroupSBSizes(struct groupdlg *grp, Group *group, int lpos, int depth
group->lpos = lpos++;
- len = 5+8*depth+ grp->as + 5 + GDrawGetText8Width(grp->v,group->name,-1,NULL);
+ len = 5+8*depth+ grp->as + 5 + GDrawGetText8Width(grp->v,group->name,-1);
if ( group->glyphs!=NULL )
- len += 5 + GDrawGetText8Width(grp->v,group->glyphs,-1,NULL);
+ len += 5 + GDrawGetText8Width(grp->v,group->glyphs,-1);
if ( len > grp->maxl )
grp->maxl = len;
@@ -239,9 +239,9 @@ static void GroupWExpose(struct groupdlg *grp,GWindow pixmap,GRect *rect) {
GDrawDrawLine(pixmap,r.x+grp->as/2,r.y+2,r.x+grp->as/2,r.y+grp->as-2,
fg);
}
- len = GDrawDrawText8(pixmap,r.x+r.width+5,y,group->name,-1,NULL,fg);
+ len = GDrawDrawText8(pixmap,r.x+r.width+5,y,group->name,-1,fg);
if ( group->glyphs )
- GDrawDrawText8(pixmap,r.x+r.width+5+len+5,y,group->glyphs,-1,NULL,fg);
+ GDrawDrawText8(pixmap,r.x+r.width+5+len+5,y,group->glyphs,-1,fg);
group = GroupNext(group,&depth);
y += grp->fh;
if ( y-grp->fh>rect->y+rect->height )
View
14 fontforge/histograms.c
@@ -445,10 +445,10 @@ static void HistExpose(GWindow pixmap, struct hist_dlg *hist) {
GDrawSetFont(pixmap,hist->font);
sprintf(buf,"%d",hist->hoff);
- GDrawDrawText8(pixmap,0,height+2+hist->as, buf,-1,NULL,0x000000);
+ GDrawDrawText8(pixmap,0,height+2+hist->as, buf,-1,0x000000);
sprintf(buf,"%d",hist->hoff+hist->hwidth/hist->barwidth);
- GDrawDrawText8(pixmap,size.width-GDrawGetText8Width(pixmap,buf,-1,NULL),height+2+hist->as,
- buf,-1,NULL,0x000000);
+ GDrawDrawText8(pixmap,size.width-GDrawGetText8Width(pixmap,buf,-1),height+2+hist->as,
+ buf,-1,0x000000);
}
static void HistRExpose(GWindow pixmap, struct hist_dlg *hist) {
@@ -463,7 +463,7 @@ static void HistRExpose(GWindow pixmap, struct hist_dlg *hist) {
sprintf(buf,"%d",hist->h->max);
GDrawDrawText8(pixmap,1,height-rint(hist->h->max*yscale),
- buf,-1,NULL,0x000000);
+ buf,-1,0x000000);
}
static void HistLExpose(GWindow pixmap, struct hist_dlg *hist) {
@@ -477,8 +477,8 @@ static void HistLExpose(GWindow pixmap, struct hist_dlg *hist) {
yscale = (4*height/5.0)/(hist->h->max-0);
sprintf(buf,"%d",hist->h->max);
- GDrawDrawText8(pixmap,size.width-GDrawGetText8Width(pixmap,buf,-1,NULL)-1,height-rint(hist->h->max*yscale),
- buf,-1,NULL,0x000000);
+ GDrawDrawText8(pixmap,size.width-GDrawGetText8Width(pixmap,buf,-1)-1,height-rint(hist->h->max*yscale),
+ buf,-1,0x000000);
}
static void HistScroll(struct hist_dlg *hist,struct sbevent *sb) {
@@ -804,7 +804,7 @@ void SFHistogram(SplineFont *sf,int layer, struct psdict *private, uint8 *select
hist.fh = as+ds; hist.as = as;
GDrawSetFont(gw,hist.font);
- hist.x = 10+GDrawGetTextWidth(gw,n9999,-1,NULL);
+ hist.x = 10+GDrawGetTextWidth(gw,n9999,-1);
hist.hwidth = pos.width - 2*hist.x;
hist.y = 10; hist.hheight = pos.width-20;
View
18 fontforge/kernclass.c
@@ -1485,16 +1485,16 @@ return;
if ( i+kcd->offtop<kcd->first_cnt ) {
int err = KCD_NameClass(kcd->sf,buf,sizeof(buf),fclasses[i+kcd->offtop].u.md_str);
int fg = err ? 0xff0000 : 0x006080;
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
if ( len<=kcd->kernw )
GDrawDrawText8(pixmap,kcd->xstart+(kcd->kernw-len)/2,kcd->ystart2+i*kcd->kernh+kcd->as+1,
- buf,-1,NULL,fg);
+ buf,-1,fg);
else {
r.x = kcd->xstart; r.width = kcd->kernw;
r.y = kcd->ystart2+i*kcd->kernh-1; r.height = kcd->kernh+1;
GDrawPushClip(pixmap,&r,&old3);
GDrawDrawText8(pixmap,r.x,r.y+kcd->as+1,
- buf,-1,NULL,fg);
+ buf,-1,fg);
GDrawPopClip(pixmap,&old3);
}
}
@@ -1505,16 +1505,16 @@ return;
if ( i+kcd->offleft<kcd->second_cnt ) {
int err = KCD_NameClass(kcd->sf,buf,sizeof(buf),sclasses[i+kcd->offleft].u.md_str);
int fg = err ? 0xff0000 : 0x006080;
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
if ( len<=kcd->kernw )
GDrawDrawText8(pixmap,kcd->xstart2+i*kcd->kernw+(kcd->kernw-len)/2,kcd->ystart+kcd->as+1,
- buf,-1,NULL,fg);
+ buf,-1,fg);
else {
r.x = kcd->xstart2+i*kcd->kernw; r.width = kcd->kernw;
r.y = kcd->ystart-1; r.height = kcd->kernh+1;
GDrawPushClip(pixmap,&r,&old3);
GDrawDrawText8(pixmap,r.x,r.y+kcd->as+1,
- buf,-1,NULL,fg);
+ buf,-1,fg);
GDrawPopClip(pixmap,&old3);
}
}
@@ -1534,9 +1534,9 @@ return;
continue;
sprintf( buf, "%d", kcd->offsets[(i+kcd->offtop)*kcd->second_cnt+j+kcd->offleft] );
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
GDrawDrawText8(pixmap,x+kcd->kernw-3-len,y+kcd->as+1,
- buf,-1,NULL,MAIN_FOREGROUND);
+ buf,-1,MAIN_FOREGROUND);
}
}
@@ -2594,7 +2594,7 @@ return;
GDrawSetFont(gw,kcd->font);
kcd->kernh = kcd->fh+3;
- kcd->kernw = GDrawGetTextWidth(gw,kernw,-1,NULL)+3;
+ kcd->kernw = GDrawGetTextWidth(gw,kernw,-1)+3;
if ( kc->subtable->separation==0 && !kc->subtable->kerning_by_touch ) {
kc->subtable->separation = sf->width_separation;
View
4 fontforge/lookupui.c
@@ -4936,10 +4936,10 @@ return( GGadgetDispatchEvent(active_fv->vsb,event));
FVDrawInfo(active_fv,pixmap,event);
GDrawSetFont(pixmap, kf->first_fv->notactive? kf->plain : kf->bold );
GDrawDrawText8(pixmap,10,kf->mbh+kf->first_fv->infoh+kf->as,
- _("Select glyphs for the first part of the kern pair"),-1,NULL,0x000000);
+ _("Select glyphs for the first part of the kern pair"),-1,0x000000);
GDrawSetFont(pixmap, kf->second_fv->notactive? kf->plain : kf->bold );
GDrawDrawText8(pixmap,10,kf->label2_y+kf->as,
- _("Select glyphs for the second part of the kern pair"),-1,NULL,0x000000);
+ _("Select glyphs for the second part of the kern pair"),-1,0x000000);
break;
case et_char:
kf_charEvent(&kf->base,event);
View
2 fontforge/math.c
@@ -1312,7 +1312,7 @@ static void MKDDraw(MathKernDlg *mkd, GWindow pixmap, GEvent *event) {
GDrawDrawRect(pixmap,&r,0);
GDrawSetFont(pixmap,cv->inactive ? mkd->plain : mkd->bold);
- GDrawDrawText8(pixmap,r.x,5+mkd->as,cornernames[i],-1,NULL,0);
+ GDrawDrawText8(pixmap,r.x,5+mkd->as,cornernames[i],-1,0);
}
}
View
12 fontforge/oflib.c
@@ -1754,32 +1754,32 @@ static int oflib_fonts_e_h(GWindow gw, GEvent *event) {
}
x = box.x + d->fh;
x += GDrawDrawText8(gw,x, box.y+d->as,
- d->show[index]->name,-1,NULL,MAIN_FOREGROUND);
+ d->show[index]->name,-1,MAIN_FOREGROUND);
if ( x< box.x + d->fh + 10*d->fh )
x = box.x + d->fh + 11*d->fh;
else
x += d->as;
x += GDrawDrawText8(gw,x, box.y+d->as,
- d->show[index]->author,-1,NULL,MAIN_FOREGROUND);
+ d->show[index]->author,-1,MAIN_FOREGROUND);
if ( x< box.x + d->fh + 17*d->fh )
x = box.x + d->fh + 18*d->fh;
else
x += d->as;
x += GDrawDrawText8(gw,x, box.y+d->as,
- d->show[index]->license==ofll_ofl?"OFL":"PD",-1,NULL,MAIN_FOREGROUND);
+ d->show[index]->license==ofll_ofl?"OFL":"PD",-1,MAIN_FOREGROUND);
if ( x< box.x + d->fh + 20*d->fh )
x = box.x + d->fh + 21*d->fh;
else
x += d->as;
x += GDrawDrawText8(gw,x, box.y+d->as,
- d->show[index]->taglist,-1,NULL,MAIN_FOREGROUND);
+ d->show[index]->taglist,-1,MAIN_FOREGROUND);
if ( x< box.x + d->fh + 42*d->fh )
x = box.x + d->fh + 43*d->fh;
else
x += d->as;
formatOFLibDate(buffer,sizeof(buffer), d->show[index]->date );
x += GDrawDrawText8(gw,x, box.y+d->as,
- buffer,-1,NULL,MAIN_FOREGROUND);
+ buffer,-1,MAIN_FOREGROUND);
if ( d->show[index]->open && d->show[index]->urls!=NULL )
du = d->show[index]->urls;
else
@@ -1788,7 +1788,7 @@ static int oflib_fonts_e_h(GWindow gw, GEvent *event) {
if ( du->selected )
GDrawFillRect(gw,&r,ACTIVE_BORDER);
GDrawDrawText8(gw,r.x + d->fh, r.y+d->as,
- du->comment,-1,NULL,MAIN_FOREGROUND);
+ du->comment,-1,MAIN_FOREGROUND);
if ( du->next!=NULL )
du = du->next;
else {
View
10 fontforge/problems.c
@@ -5121,7 +5121,7 @@ static void VWDrawWindow(GWindow pixmap,struct val_data *vw, GEvent *e) {
if ( gid==-1 ) {
GDrawDrawText8(pixmap,2,(vw->vlcnt-1)*vw->fh/2 + vw->as,
vw->finished_first_pass ? _("Passed Validation") : _("Thinking..."),
- -1,NULL,0x000000 );
+ -1,0x000000 );
GDrawPopClip(pixmap,&old);
return;
}
@@ -5151,13 +5151,13 @@ return;
if ( !sc->vs_open )
GDrawDrawLine(pixmap,r.x+vw->as/2,r.y+2,r.x+vw->as/2,r.y+vw->as-2,
0x000000);
- GDrawDrawText8(pixmap,r.x+r.width+2,y,sc->name,-1,NULL,0x000000 );
+ GDrawDrawText8(pixmap,r.x+r.width+2,y,sc->name,-1,0x000000 );
y += vw->fh;
++sofar;
if ( sc->vs_open ) {
for ( m=0, bit=(vs_known<<1) ; bit<=vs_last; ++m, bit<<=1 )
if ( (bit&vw->mask) && (vs&bit) && vserrornames[m]!=NULL ) {
- GDrawDrawText8(pixmap,10+r.width+r.x,y,_(vserrornames[m]),-1,NULL,0xff0000 );
+ GDrawDrawText8(pixmap,10+r.width+r.x,y,_(vserrornames[m]),-1,0xff0000 );
y += vw->fh;
++sofar;
}
@@ -5172,11 +5172,11 @@ return;
if ( vs!=0 ) {
/* GT: "Private" is a keyword (sort of) in PostScript. Perhaps it */
/* GT: should remain untranslated? */
- GDrawDrawText8(pixmap,r.x+r.width+2,y,_("Private Dictionary"),-1,NULL,0x000000 );
+ GDrawDrawText8(pixmap,r.x+r.width+2,y,_("Private Dictionary"),-1,0x000000 );
y += vw->fh;
for ( m=0, bit=1 ; bit!=0; ++m, bit<<=1 ) {
if ( vs&bit ) {
- GDrawDrawText8(pixmap,10+r.width+r.x,y,_(privateerrornames[m]),-1,NULL,0xff0000 );
+ GDrawDrawText8(pixmap,10+r.width+r.x,y,_(privateerrornames[m]),-1,0xff0000 );
y += vw->fh;
}
}
View
4 fontforge/searchview.c
@@ -377,13 +377,13 @@ static void SVDraw(SearchView *sv, GWindow pixmap, GEvent *event) {
else
GDrawSetFont(pixmap,sv->bold);
GDrawDrawText8(pixmap,10,sv->mbh+5+sv->as,
- _("Search Pattern:"),-1,NULL,0);
+ _("Search Pattern:"),-1,0);
if ( sv->cv_rpl.inactive )
GDrawSetFont(pixmap,sv->plain);
else
GDrawSetFont(pixmap,sv->bold);
GDrawDrawText8(pixmap,sv->rpl_x,sv->mbh+5+sv->as,
- _("Replace Pattern:"),-1,NULL,0);
+ _("Replace Pattern:"),-1,0);
r.x = 10-1; r.y=sv->cv_y-1;
r.width = sv->cv_width+1; r.height = sv->cv_height+1;
GDrawDrawRect(pixmap,&r,0);
View
2 fontforge/sftextfield.c
@@ -2185,7 +2185,7 @@ static void SFTextAreaFit(SFTextArea *st) {
{ /* This doesn't mean much of anything */
FontInstance *old = GDrawSetFont(st->g.base,st->font);
- (void) GDrawGetTextBounds(st->g.base,st->li.text, -1, NULL, &bounds);
+ (void) GDrawGetTextBounds(st->g.base,st->li.text, -1, &bounds);
GDrawWindowFontMetrics(st->g.base,st->font,&as, &ds, &ld);
if ( as<bounds.as ) as = bounds.as;
if ( ds<bounds.ds ) ds = bounds.ds;
View
10 fontforge/showatt.c
@@ -2120,7 +2120,7 @@ static int _SizeCnt(struct att_dlg *att,struct node *node, int lpos,int depth) {
if ( node->monospace )
GDrawSetFont(att->v,att->monofont);
node->lpos = lpos++;
- len = 5+8*depth+ att->as + 5 + GDrawGetText8Width(att->v,node->label,-1,NULL);
+ len = 5+8*depth+ att->as + 5 + GDrawGetText8Width(att->v,node->label,-1);
if ( len>att->maxl ) att->maxl = len;
if ( node->monospace )
GDrawSetFont(att->v,att->font);
@@ -2263,12 +2263,12 @@ static void AttExpose(struct att_dlg *att,GWindow pixmap,GRect *rect) {
ept = findendquote(spt);
}
if ( ept==NULL )
- GDrawDrawText8(pixmap,r.x+r.width+5,y,node->label,-1,NULL,fg);
+ GDrawDrawText8(pixmap,r.x+r.width+5,y,node->label,-1,fg);
else {
int len;
- len = GDrawDrawText8(pixmap,r.x+r.width+5,y,node->label,spt-node->label,NULL,fg);
- len += GDrawDrawText8(pixmap,r.x+r.width+5+len,y,spt,ept-spt,NULL,0x0000ff);
- GDrawDrawText8(pixmap,r.x+r.width+5+len,y,ept,-1,NULL,fg);
+ len = GDrawDrawText8(pixmap,r.x+r.width+5,y,node->label,spt-node->label,fg);
+ len += GDrawDrawText8(pixmap,r.x+r.width+5+len,y,spt,ept-spt,0x0000ff);
+ GDrawDrawText8(pixmap,r.x+r.width+5+len,y,ept,-1,fg);
}
if ( node->monospace )
GDrawSetFont(pixmap,att->font);
View
12 fontforge/startui.c
@@ -193,7 +193,7 @@ static void SplashLayout() {
lastspace = NULL;
for ( pt=start; ; ++pt ) {
if ( *pt==' ' || *pt=='\0' ) {
- if ( GDrawGetTextWidth(splashw,start,pt-start,NULL)<splashimage.u.image->width-10 )
+ if ( GDrawGetTextWidth(splashw,start,pt-start)<splashimage.u.image->width-10 )
lastspace = pt;
else
break;
@@ -533,15 +533,15 @@ static int splash_e_h(GWindow gw, GEvent *event) {
y = splashimage.u.image->height + as + fh/2;
for ( i=1; i<linecnt; ++i ) {
if ( is>=lines[i-1]+1 && is<lines[i] ) {
- x = 8+GDrawDrawText(gw,8,y,lines[i-1]+1,is-lines[i-1]-1,NULL,0x000000);
+ x = 8+GDrawDrawText(gw,8,y,lines[i-1]+1,is-lines[i-1]-1,0x000000);
GDrawSetFont(gw,splash_italic);
- GDrawDrawText(gw,x,y,is,lines[i]-is,NULL,0x000000);
+ GDrawDrawText(gw,x,y,is,lines[i]-is,0x000000);
} else if ( ie>=lines[i-1]+1 && ie<lines[i] ) {
- x = 8+GDrawDrawText(gw,8,y,lines[i-1]+1,ie-lines[i-1]-1,NULL,0x000000);
+ x = 8+GDrawDrawText(gw,8,y,lines[i-1]+1,ie-lines[i-1]-1,0x000000);
GDrawSetFont(gw,splash_font);
- GDrawDrawText(gw,x,y,ie,lines[i]-ie,NULL,0x000000);
+ GDrawDrawText(gw,x,y,ie,lines[i]-ie,0x000000);
} else
- GDrawDrawText(gw,8,y,lines[i-1]+1,lines[i]-lines[i-1]-1,NULL,0x000000);
+ GDrawDrawText(gw,8,y,lines[i-1]+1,lines[i]-lines[i-1]-1,0x000000);
y += fh;
}
GDrawPopClip(gw,&old);
View
26 fontforge/statemachine.c
@@ -961,7 +961,7 @@ return;
for ( j=0; j<len; ++j ) {
ubuf[0] = buf[j];
GDrawDrawText(pixmap,smd->xstart+3,smd->ystart2+i*smd->stateh+off+j*smd->fh+smd->as,
- ubuf,1,NULL,0xff0000);
+ ubuf,1,0xff0000);
}
}
}
@@ -970,11 +970,11 @@ return;
0x808080);
if ( i+smd->offleft<smd->class_cnt ) {
GDrawDrawText8(pixmap,smd->xstart2+i*smd->statew+1,smd->ystart+smd->as+1,
- "Class",-1,NULL,0xff0000);
+ "Class",-1,0xff0000);
sprintf( buf, "%d", i+smd->offleft );
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
GDrawDrawText8(pixmap,smd->xstart2+i*smd->statew+(smd->statew-len)/2,smd->ystart+smd->fh+smd->as+1,
- buf,-1,NULL,0xff0000);
+ buf,-1,0xff0000);
}
}
@@ -993,9 +993,9 @@ return;
continue;
sprintf( buf, "%d", this->next_state );
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
GDrawDrawText8(pixmap,x+(smd->statew-len)/2,y+smd->as+1,
- buf,-1,NULL,0x000000);
+ buf,-1,0x000000);
ubuf[0] = (this->flags&0x8000)? 'M' : ' ';
if ( smd->sm->type==asm_kern && (this->flags&0x8000))
@@ -1006,9 +1006,9 @@ return;
ubuf[2] = (this->flags&0x2000) ? 'L' : ' ';
ubuf[3] = '\0';
}
- len = GDrawGetTextWidth(pixmap,ubuf,-1,NULL);
+ len = GDrawGetTextWidth(pixmap,ubuf,-1);
GDrawDrawText(pixmap,x+(smd->statew-len)/2,y+smd->fh+smd->as+1,
- ubuf,-1,NULL,0x000000);
+ ubuf,-1,0x000000);
buf[0]='\0';
if ( smd->sm->type==asm_indic ) {
@@ -1032,9 +1032,9 @@ return;
} else
kddd = false;
}
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
GDrawDrawText8(pixmap,x+(smd->statew-len)/2,y+2*smd->fh+smd->as+1,
- buf,-1,NULL,0x000000);
+ buf,-1,0x000000);
buf[0] = '\0';
if ( smd->sm->type==asm_indic ) {
@@ -1051,9 +1051,9 @@ return;
if ( kddd ) strcpy(buf,"...");
else buf[0] = '\0';
}
- len = GDrawGetText8Width(pixmap,buf,-1,NULL);
+ len = GDrawGetText8Width(pixmap,buf,-1);
GDrawDrawText8(pixmap,x+(smd->statew-len)/2,y+3*smd->fh+smd->as+1,
- buf,-1,NULL,0x000000);
+ buf,-1,0x000000);
}
}
@@ -1515,7 +1515,7 @@ void StateMachineEdit(SplineFont *sf,ASM *sm,struct gfi_data *d) {
GDrawSetFont(gw,smd.font);
smd.stateh = 4*smd.fh+3;
- smd.statew = GDrawGetTextWidth(gw,statew,-1,NULL)+3;
+ smd.statew = GDrawGetTextWidth(gw,statew,-1)+3;
smd.xstart2 = smd.xstart+smd.statew/2;
smd.ystart2 = smd.ystart+2*smd.fh+1;
View
2 fontforge/tilepath.c
@@ -782,7 +782,7 @@ static void TPDDraw(TilePathDlg *tpd, GWindow pixmap, GEvent *event) {
GDrawDrawRect(pixmap,&r,0);
GDrawSetFont(pixmap,cv->inactive ? tpd->plain : tpd->bold);
- GDrawDrawText8(pixmap,r.x,pos.y-2-tpd->fh+tpd->as,_(tilenames[i]),-1,NULL,0);
+ GDrawDrawText8(pixmap,r.x,pos.y-2-tpd->fh+tpd->as,_(tilenames[i]),-1,0);
}
}
View
30 fontforge/ttfinstrsui.c
@@ -373,10 +373,10 @@ static void instr_expose(struct instrinfo *ii,GWindow pixmap,GRect *rect) {
GDrawSetLineWidth(pixmap,0);
addr_end = 0;
if ( ii->showaddr )
- addr_end = GDrawGetTextWidth(pixmap,nums,4,NULL)+EDGE_SPACING;
+ addr_end = GDrawGetTextWidth(pixmap,nums,4)+EDGE_SPACING;
num_end = addr_end;
if ( ii->showhex )
- num_end = addr_end + GDrawGetTextWidth(pixmap,nums,5,NULL)+4;
+ num_end = addr_end + GDrawGetTextWidth(pixmap,nums,5)+4;
else if ( addr_end<36+2*EDGE_SPACING )
num_end = addr_end = 36+2*EDGE_SPACING;
@@ -409,10 +409,10 @@ static void instr_expose(struct instrinfo *ii,GWindow pixmap,GRect *rect) {
}
if ( y<=high && ii->instrdata->instr_cnt==0 && i==0 ) {
if ( ii->instrdata->in_composit ) {
- GDrawDrawText8(pixmap,num_end+EDGE_SPACING,y+ii->as,_("<instrs inherited>"),-1,NULL,0xff0000);
+ GDrawDrawText8(pixmap,num_end+EDGE_SPACING,y+ii->as,_("<instrs inherited>"),-1,0xff0000);
y += ii->fh;
}
- GDrawDrawText8(pixmap,num_end+EDGE_SPACING,y+ii->as,_("<no instrs>"),-1,NULL,0xff0000);
+ GDrawDrawText8(pixmap,num_end+EDGE_SPACING,y+ii->as,_("<no instrs>"),-1,0xff0000);
} else {
int temp_indent;
for ( ; y<=high && i<ii->instrdata->instr_cnt+1; ++i ) {
@@ -455,8 +455,8 @@ static void instr_expose(struct instrinfo *ii,GWindow pixmap,GRect *rect) {
}
x = addr_end + EDGE_SPACING;
if ( ii->showhex )
- GDrawDrawText(pixmap,x,y+ii->as,uins,-1,NULL,MAIN_FOREGROUND);
- GDrawDrawText(pixmap,num_end+EDGE_SPACING+temp_indent*4,y+ii->as,uname,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText(pixmap,x,y+ii->as,uins,-1,MAIN_FOREGROUND);
+ GDrawDrawText(pixmap,num_end+EDGE_SPACING+temp_indent*4,y+ii->as,uname,-1,MAIN_FOREGROUND);
y += ii->fh;
}
if ( ii->showaddr && ii->lstopped!=-1 ) {
@@ -1231,14 +1231,14 @@ static void short_expose(ShortView *sv,GWindow pixmap,GRect *rect) {
y = low;
for ( ; y<=high && index<sv->len/2; ++index ) {
sprintf( caddr, "%d", index );
- x = sv->addrend - ADDR_SPACER - GDrawGetText8Width(pixmap,caddr,-1,NULL);
- GDrawDrawText8(pixmap,x,y+sv->as,caddr,-1,NULL,MAIN_FOREGROUND);
+ x = sv->addrend - ADDR_SPACER - GDrawGetText8Width(pixmap,caddr,-1);
+ GDrawDrawText8(pixmap,x,y+sv->as,caddr,-1,MAIN_FOREGROUND);
sprintf( cval, "%d", sv->edits[index] );
- GDrawDrawText8(pixmap,sv->addrend,y+sv->as,cval,-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,sv->addrend,y+sv->as,cval,-1,MAIN_FOREGROUND);
if ( sv->comments[index]!=NULL )
- GDrawDrawText8(pixmap,sv->valend,y+sv->as,sv->comments[index],-1,NULL,MAIN_FOREGROUND);
+ GDrawDrawText8(pixmap,sv->valend,y+sv->as,sv->comments[index],-1,MAIN_FOREGROUND);
y += sv->fh;
}
}
@@ -1359,10 +1359,10 @@ static int sv_e_h(GWindow gw, GEvent *event) {
r.x = r.y = 0; r.width = sv->vwidth+40; r.height = sv->fh-1;
GDrawFillRect(gw,&r,0x808080);
GDrawSetFont(gw,sv->gfont);
- x = sv->addrend - ADDR_SPACER - 2 - GDrawGetText8Width(gw,_("Index"),-1,NULL);
- GDrawDrawText8(gw,x,sv->as,_("Index"),-1,NULL,0xffffff);
- GDrawDrawText8(gw,sv->addrend,sv->as,_("Value"),-1,NULL,0xffffff);
- GDrawDrawText8(gw,sv->valend,sv->as,_("Comment"),-1,NULL,0xffffff);
+ x = sv->addrend - ADDR_SPACER - 2 - GDrawGetText8Width(gw,_("Index"),-1);
+ GDrawDrawText8(gw,x,sv->as,_("Index"),-1,0xffffff);
+ GDrawDrawText8(gw,sv->addrend,sv->as,_("Value"),-1,0xffffff);
+ GDrawDrawText8(gw,sv->valend,sv->as,_("Comment"),-1,0xffffff);
GDrawDrawLine(gw,0,sv->fh-1,r.width,sv->fh-1,0x000000);
GDrawDrawLine(gw,0,sv->vheight+sv->fh,sv->vwidth,sv->vheight+sv->fh,0x000000);
@@ -1562,7 +1562,7 @@ static void cvtCreateEditor(struct ttf_table *tab,SplineFont *sf,uint32 tag) {
sv->as = as+1;
sv->fh = sv->as+ds;
- sv->chrlen = numlen = GDrawGetTextWidth(sv->v,num,1,NULL);
+ sv->chrlen = numlen = GDrawGetTextWidth(sv->v,num,1);
sv->addrend = 6*numlen + ADDR_SPACER + EDGE_SPACER;
sv->valend = sv->addrend + 7*numlen + ADDR_SPACER + EDGE_SPACER;
View
34 gdraw/gaskdlg.c
@@ -219,12 +219,12 @@ return( NULL );
fh = as+ds;
maxw = 0;
for ( i=0; i<lb; ++i ) {
- w = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ w = GDrawGetTextWidth(gw,qlabels[i].text,-1);
if ( w>maxw ) maxw = w;
}
bw = 0;
for ( i=0; i<bcnt; ++i ) {
- w = GDrawGetTextWidth(gw,answers[i],-1,NULL);
+ w = GDrawGetTextWidth(gw,answers[i],-1);
if ( w>bw ) bw = w;
}
bw += GDrawPointsToPixels(gw,20);
@@ -237,7 +237,7 @@ return( NULL );
gcd = gcalloc(lb+bcnt+2,sizeof(GGadgetCreateData));
if ( lb==1 ) {
- gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1,NULL);
+ gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1);
gcd[0].gd.pos.x = (maxw-gcd[0].gd.pos.width)/2;
gcd[0].gd.pos.y = GDrawPointsToPixels(gw,6);
gcd[0].gd.pos.height = fh;
@@ -247,7 +247,7 @@ return( NULL );
} else for ( i=0; i<lb; ++i ) {
gcd[i].gd.pos.x = GDrawPointsToPixels(gw,8);
gcd[i].gd.pos.y = GDrawPointsToPixels(gw,6)+i*fh;
- gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1);
gcd[i].gd.pos.height = fh;
gcd[i].gd.flags = gg_visible | gg_enabled | gg_pos_in_pixels | gg_pos_use0;
gcd[i].gd.label = &qlabels[i];
@@ -721,7 +721,7 @@ static GWindow ChoiceDlgCreate(struct dlg_info *d,const unichar_t *title,
maxw = 220;
for ( i=0; i<lb; ++i ) {
if ( qlabels[i].text!=NULL ) {
- w = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ w = GDrawGetTextWidth(gw,qlabels[i].text,-1);
if ( w>maxw ) maxw = w;
}
}
@@ -732,7 +732,7 @@ static GWindow ChoiceDlgCreate(struct dlg_info *d,const unichar_t *title,
memset(boxes,0,sizeof(boxes));
l=0;
if ( lb==1 ) {
- gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1,NULL);
+ gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1);
gcd[0].gd.pos.x = (maxw-gcd[0].gd.pos.width)/2;
gcd[0].gd.pos.y = GDrawPointsToPixels(gw,6);
gcd[0].gd.pos.height = fh;
@@ -749,7 +749,7 @@ static GWindow ChoiceDlgCreate(struct dlg_info *d,const unichar_t *title,
} else for ( i=0; i<lb; ++i ) {
gcd[i].gd.pos.x = GDrawPointsToPixels(gw,8);
gcd[i].gd.pos.y = GDrawPointsToPixels(gw,6)+i*fh;
- gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1);
gcd[i].gd.pos.height = fh;
gcd[i].gd.flags = gg_visible | gg_enabled | gg_pos_in_pixels | gg_pos_use0;
gcd[i].gd.label = &qlabels[i];
@@ -1013,24 +1013,24 @@ return( NULL );
fh = as+ds;
maxw = 0;
for ( i=0; i<lb; ++i ) {
- w = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ w = GDrawGetTextWidth(gw,qlabels[i].text,-1);
if ( w>maxw ) maxw = w;
}
if ( add_text && defstr!=NULL ) {
extern GFont *_gtextfield_font;
if ( _gtextfield_font!=NULL ) {
GDrawSetFont(gw,_gtextfield_font);
- w = GDrawGetText8Width(gw,defstr,-1,NULL);
+ w = GDrawGetText8Width(gw,defstr,-1);
GDrawSetFont(gw,_ggadget_default_font);
} else
- w = 8*GDrawGetText8Width(gw,defstr,-1,NULL)/5;
+ w = 8*GDrawGetText8Width(gw,defstr,-1)/5;
w += GDrawPointsToPixels(gw,40);
if ( w >1000 ) w = 1000;
if ( w>maxw ) maxw = w;
}
bw = 0;
for ( i=0; i<bcnt; ++i ) {
- w = GDrawGetText8Width(gw,answers[i],-1,NULL);
+ w = GDrawGetText8Width(gw,answers[i],-1);
if ( w>bw ) bw = w;
}
bw += GDrawPointsToPixels(gw,20);
@@ -1045,7 +1045,7 @@ return( NULL );
memset(boxes,0,sizeof(boxes));
l = 0;
if ( lb==1 ) {
- gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1,NULL);
+ gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1);
gcd[0].gd.pos.x = (maxw-gcd[0].gd.pos.width)/2;
gcd[0].gd.pos.y = GDrawPointsToPixels(gw,6);
gcd[0].gd.pos.height = fh;
@@ -1061,7 +1061,7 @@ return( NULL );
} else for ( i=0; i<lb; ++i ) {
gcd[i].gd.pos.x = GDrawPointsToPixels(gw,8);
gcd[i].gd.pos.y = GDrawPointsToPixels(gw,6)+i*fh;
- gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1);
gcd[i].gd.pos.height = fh;
gcd[i].gd.flags = gg_visible | gg_enabled | gg_pos_in_pixels | gg_pos_use0;
gcd[i].gd.label = &qlabels[i];
@@ -1410,13 +1410,13 @@ static GWindow ChoiceDlgCreate8(struct dlg_info *d,const char *title,
maxw = 220;
for ( i=0; i<cnt; ++i) {
if ( llabels[i].text!=NULL ) { /* lines */
- w = GDrawGetText8Width(gw,(char *) llabels[i].text,-1,NULL);
+ w = GDrawGetText8Width(gw,(char *) llabels[i].text,-1);
if ( w>900 ) w = 900;
if ( w>maxw ) maxw = w;
}
}
for ( i=0; i<lb; ++i ) {
- w = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ w = GDrawGetTextWidth(gw,qlabels[i].text,-1);
if ( w>maxw ) maxw = w;
}
maxw += GDrawPointsToPixels(gw,20);
@@ -1426,7 +1426,7 @@ static GWindow ChoiceDlgCreate8(struct dlg_info *d,const char *title,
memset(boxes,0,sizeof(boxes));
l=0;
if ( lb==1 ) {
- gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1,NULL);
+ gcd[0].gd.pos.width = GDrawGetTextWidth(gw,qlabels[0].text,-1);
gcd[0].gd.pos.x = (maxw-gcd[0].gd.pos.width)/2;
gcd[0].gd.pos.y = GDrawPointsToPixels(gw,6);
gcd[0].gd.pos.height = fh;
@@ -1442,7 +1442,7 @@ static GWindow ChoiceDlgCreate8(struct dlg_info *d,const char *title,
} else for ( i=0; i<lb; ++i ) {
gcd[i].gd.pos.x = GDrawPointsToPixels(gw,8);
gcd[i].gd.pos.y = GDrawPointsToPixels(gw,6)+i*fh;
- gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1,NULL);
+ gcd[i].gd.pos.width = GDrawGetTextWidth(gw,qlabels[i].text,-1);
gcd[i].gd.pos.height = fh;
gcd[i].gd.flags = gg_visible | gg_enabled | gg_pos_in_pixels | gg_pos_use0;
gcd[i].gd.label = &qlabels[i];
View
9 gdraw/gbuttons.c
@@ -281,7 +281,7 @@ static int gbutton_stringsize( GButton *gb,unichar_t *label,int *lcnt ) {
for ( pt = label; ; ) {
for ( start=pt; *pt!='\0' && *pt!='\n'; ++pt );
if ( pt!=start ) {
- int w = GDrawGetTextWidth(gb->g.base,start,pt-start,NULL);
+ int w = GDrawGetTextWidth(gb->g.base,start,pt-start);
if ( w>maxtextwidth ) maxtextwidth=w;
}
++(*lcnt);
@@ -416,14 +416,13 @@ return( false );
if ( lcnt==1 ) {
_ggadget_underlineMnemonic(pixmap,x,g->inner.y + gb->as + yoff + off,gb->label,
g->mnemonic,fg,g->inner.y+g->inner.height);
- x += GDrawDrawText(pixmap,x,g->inner.y + gb->as + yoff + off,gb->label,-1,NULL,
- fg );
+ x += GDrawDrawText(pixmap,x,g->inner.y + gb->as + yoff + off,gb->label,-1,fg);
} else {
int y = g->inner.y + gb->as + yoff + off;
for ( pt = gb->label; ; ) {
for ( start=pt; *pt!='\0' && *pt!='\n'; ++pt );
if ( pt!=start )
- GDrawDrawText(pixmap,x,y,start,pt-start,NULL,fg);
+ GDrawDrawText(pixmap,x,y,start,pt-start,fg);
if ( *pt=='\0' )
break;
++pt;
@@ -741,7 +740,7 @@ static void GButtonGetDesiredSize(GGadget *g, GRect *outer, GRect *inner) {
ltxt = gbutton_textsize(gl,&lcnt,&width);
if ( lcnt==1 ) {
FontInstance *old = GDrawSetFont(gl->g.base,gl->font);
- width = GDrawGetTextBounds(gl->g.base,ltxt, -1, NULL, &bounds);
+ width = GDrawGetTextBounds(gl->g.base,ltxt, -1, &bounds);
GDrawSetFont(gl->g.base,old);
if ( as<bounds.as ) as = bounds.as;
if ( ds<bounds.ds ) ds = bounds.ds;
View
6 gdraw/gchardlg.c
@@ -747,7 +747,7 @@ static void InsChrExpose( GWindow pixmap, GRect *rect) {
uc_strcpy(ubuf,buffer);
GDrawDrawText(pixmap,GDrawPointsToPixels(pixmap,6),
GDrawPointsToPixels(pixmap,90)+inschr.sas,
- ubuf, -1, NULL, 0x000000 );
+ ubuf, -1, 0x000000 );
GDrawPopClip(pixmap,&old);
}
if ( rect->y+rect->height < inschr.ybase )
@@ -789,11 +789,11 @@ return;
continue;
buf[0] = InsChrMapChar(i*16+j);
if ( buf[0]==0xad ) buf[0] = '-'; /* 0xad usually doesn't print */
- width = GDrawGetTextWidth(pixmap,buf,1,NULL);
+ width = GDrawGetTextWidth(pixmap,buf,1);
GDrawDrawText(pixmap,
j*inschr.spacing+(inschr.spacing-width)/2,
i*inschr.spacing+inschr.ybase+inschr.as+4,
- buf,1,NULL,0x000000);
+ buf,1,0x000000);
}
if ( inschr.flash )
InsChrXorChar(pixmap,inschr.x,inschr.y);
View
4 gdraw/gdrawP.h
@@ -216,8 +216,8 @@ struct displayfuncs {
struct font_data *(*scaleFont)(GDisplay *, struct font_data *fd,FontRequest *rq);
struct font_data *(*stylizeFont)(GDisplay *, struct font_data *fd,FontRequest *rq);
/* XFontStruct **/void *(*loadFontMetrics)(GDisplay *, struct font_data *fd);
- void (*drawText1)(GWindow, struct font_data *fd, int32 x, int32 y, char *txt, int32 cnt, FontMods *, Color col);
- void (*drawText2)(GWindow, struct font_data *fd, int32 x, int32 y, GChar2b *txt, int32 cnt, FontMods *, Color col);
+ void (*drawText1)(GWindow, struct font_data *fd, int32 x, int32 y, char *txt, int32 cnt, Color col);
+ void (*drawText2)(GWindow, struct font_data *fd, int32 x, int32 y, GChar2b *txt, int32 cnt, Color col);
GIC *(*createInputContext)(GWindow, enum gic_style);
void (*setGIC)(GWindow, GIC *, int x, int y);
View
10 gdraw/gdrawerror.c
@@ -52,18 +52,18 @@ static int e_h(GWindow gw, GEvent *event) {
if ( event->type == et_expose ) {
max_len = 0;
for ( line = 0; line<ERR_LINE_MAX && errinfo.lines[line]!=NULL; ++line ) {
- len = GDrawGetTextWidth(gw,errinfo.lines[line],-1,NULL);
+ len = GDrawGetTextWidth(gw,errinfo.lines[line],-1);
if ( len>max_len ) max_len = len;
}
x = (errinfo.width-max_len)/2;
for ( line = 0; line<ERR_LINE_MAX && errinfo.lines[line]!=NULL; ++line )
- GDrawDrawText(gw,x, 10+10+15*line, errinfo.lines[line],-1,NULL,0x000000);
+ GDrawDrawText(gw,x, 10+10+15*line, errinfo.lines[line],-1,0x000000);
- x = (errinfo.width-(len = GDrawGetTextWidth(gw,ok,2,NULL)))/2;
+ x = (errinfo.width-(len = GDrawGetTextWidth(gw,ok,2)))/2;
r.x = x-10; r.y = 25+15*line; r.width = len+20; r.height = 18;
GDrawFillRect(gw,&r,0xffffff);
GDrawDrawRect(gw,&r,0x000000);
- GDrawDrawText(gw,x,r.y+13,ok,2,NULL,0x000000);
+ GDrawDrawText(gw,x,r.y+13,ok,2,0x000000);
} else if ( event->type==et_char ) {
if ( event->u.chr.chars[0]=='\r' || event->u.chr.chars[0]=='\33' )
errinfo.dismissed = true;
@@ -110,7 +110,7 @@ static void ProcessText(unichar_t *ubuf,char *buf, enum err_type et) {
max_len = 0;
for ( line = 0; line<ERR_LINE_MAX && errinfo.lines[line]!=NULL; ++line ) {
- len = GDrawGetTextWidth(error,errinfo.lines[line],-1,NULL);
+ len = GDrawGetTextWidth(error,errinfo.lines[line],-1);
if ( len>max_len ) max_len = len;
}
errinfo.width = max_len+30;
View
25 gdraw/gdrawtxt.c
@@ -75,51 +75,50 @@ return( rq );
/* ************************************************************************** */
-int32 GDrawDrawText(GWindow gw, int32 x, int32 y,
- const unichar_t *text, int32 cnt, FontMods *mods, Color col) {
+int32 GDrawDrawText(GWindow gw, int32 x, int32 y, const unichar_t *text, int32 cnt, Color col) {
struct tf_arg arg;
-return( _GXPDraw_DoText(gw,x,y,text,cnt,mods,col,tf_drawit,&arg));
+return( _GXPDraw_DoText(gw,x,y,text,cnt,col,tf_drawit,&arg));
}
-int32 GDrawGetTextWidth(GWindow gw,const unichar_t *text, int32 cnt, FontMods *mods) {
+int32 GDrawGetTextWidth(GWindow gw,const unichar_t *text, int32 cnt) {
struct tf_arg arg;
-return( _GXPDraw_DoText(gw,0,0,text,cnt,mods,0x0,tf_width,&arg));
+return( _GXPDraw_DoText(gw,0,0,text,cnt,0x0,tf_width,&arg));
}
-int32 GDrawGetTextBounds(GWindow gw,const unichar_t *text, int32 cnt, FontMods *mods, GTextBounds *bounds) {
+int32 GDrawGetTextBounds(GWindow gw,const unichar_t *text, int32 cnt, GTextBounds *bounds) {
int ret;
struct tf_arg arg;
memset(&arg,'\0',sizeof(arg));
arg.first = true;
- ret = _GXPDraw_DoText(gw,0,0,text,cnt,mods,0x0,tf_rect,&arg);
+ ret = _GXPDraw_DoText(gw,0,0,text,cnt,0x0,tf_rect,&arg);
*bounds = arg.size;
return( ret );
}
/* UTF8 routines */
-int32 GDrawDrawText8(GWindow gw, int32 x, int32 y, const char *text, int32 cnt, FontMods *mods, Color col) {
+int32 GDrawDrawText8(GWindow gw, int32 x, int32 y, const char *text, int32 cnt, Color col) {
struct tf_arg arg;
-return( _GXPDraw_DoText8(gw,x,y,text,cnt,mods,col,tf_drawit,&arg));
+return( _GXPDraw_DoText8(gw,x,y,text,cnt,col,tf_drawit,&arg));
}
-int32 GDrawGetText8Width(GWindow gw, const char *text, int32 cnt, FontMods *mods) {
+int32 GDrawGetText8Width(GWindow gw, const char *text, int32 cnt) {
struct tf_arg arg;
-return( _GXPDraw_DoText8(gw,0,0,text,cnt,mods,0x0,tf_width,&arg));
+return( _GXPDraw_DoText8(gw,0,0,text,cnt,0x0,tf_width,&arg));
}
-int32 GDrawGetText8Bounds(GWindow gw,const char *text, int32 cnt, FontMods *mods, GTextBounds *bounds) {
+int32 GDrawGetText8Bounds(GWindow gw,const char *text, int32 cnt, GTextBounds *bounds) {
int ret;
struct tf_arg arg;
memset(&arg,'\0',sizeof(arg));
arg.first = true;
- ret = _GXPDraw_DoText8(gw,0,0,text,cnt,mods,0x0,tf_rect,&arg);
+ ret = _GXPDraw_DoText8(gw,0,0,text,cnt,0x0,tf_rect,&arg);
*bounds = arg.size;
return( ret );
}
View
4 gdraw/ggadgets.c
@@ -576,7 +576,7 @@ return( true );
temp = -1;
if (( ept = u_strchr(pt,'\n'))!=NULL )
temp = ept-pt;
- temp = GDrawGetTextWidth(popup,pt,temp,NULL);
+ temp = GDrawGetTextWidth(popup,pt,temp);
if ( temp>width ) width = temp;
++lines;
pt = ept+1;
@@ -627,7 +627,7 @@ return( true );
temp = -1;
if (( ept = u_strchr(pt,'\n'))!=NULL )
temp = ept-pt;
- GDrawDrawText(popup,x,y,pt,temp,NULL,popup_foreground);
+ GDrawDrawText(popup,x,y,pt,temp,popup_foreground);
y += fh;
pt = ept+1;
} while ( ept!=NULL && *pt!='\0' );
View
36 gdraw/gmatrixedit.c
@@ -251,26 +251,26 @@ static int GME_ColWidth(GMatrixEdit *gme, int c) {
return( 0 );
switch ( gme->col_data[c].me_type ) {
case me_int:
- width = GDrawGetText8Width(gme->g.base,"1234", -1, NULL );
+ width = GDrawGetText8Width(gme->g.base,"1234", -1);
break;
case me_hex: case me_addr:
- width = GDrawGetText8Width(gme->g.base,"0xFFFF", -1, NULL );
+ width = GDrawGetText8Width(gme->g.base,"0xFFFF", -1);
break;
case me_uhex:
- width = GDrawGetText8Width(gme->g.base,"U+FFFF", -1, NULL );
+ width = GDrawGetText8Width(gme->g.base,"U+FFFF", -1);
break;
case me_real:
- width = GDrawGetText8Width(gme->g.base,"1.234567", -1, NULL );
+ width = GDrawGetText8Width(gme->g.base,"1.234567", -1);
break;
case me_enum:
max = 0;
for ( r=0; r<gme->rows; ++r ) {
mi = FindMi(gme->col_data[c].enum_vals,gme->data[r*gme->cols+c].u.md_ival);
if ( mi!=NULL ) {
if ( mi->ti.text_is_1byte )
- cur = GDrawGetText8Width(gme->g.base,(char *)mi->ti.text,-1,NULL);
+ cur = GDrawGetText8Width(gme->g.base,(char *)mi->ti.text,-1);
else
- cur = GDrawGetTextWidth(gme->g.base,mi->ti.text,-1,NULL);
+ cur = GDrawGetTextWidth(gme->g.base,mi->ti.text,-1);
if ( cur>max ) max = cur;
}
}
@@ -279,13 +279,13 @@ return( 0 );
GMenuItem *mi = gme->col_data[c].enum_vals;
for ( i=0; mi[i].ti.text!=NULL || mi[i].ti.line ; ++i ) {
if ( mi[i].ti.text!=NULL ) {
- cur = GDrawGetTextWidth(gme->g.base,mi[i].ti.text, -1, NULL );
+ cur = GDrawGetTextWidth(gme->g.base,mi[i].ti.text, -1);
if ( cur>max ) max = cur;
}
}
}
#endif
- cur = 6 * GDrawGetText8Width(gme->g.base,"n", 1, NULL );
+ cur = 6 * GDrawGetText8Width(gme->g.base,"n", 1);
if ( max<cur )
max = cur;
width = max;
@@ -310,12 +310,12 @@ return( 0 );
char buf[1024];
utf8_strncpy(buf, str, 40);
pt = strchr(buf,'\n');
- cur = GDrawGetText8Width(gme->g.base,buf, pt==NULL ? -1: pt-buf, NULL );
+ cur = GDrawGetText8Width(gme->g.base,buf, pt==NULL ? -1: pt-buf);
if ( cur>max ) max = cur;
free(freeme);
}
- if ( max < 10*GDrawGetText8Width(gme->g.base,"n", 1, NULL ) )
- width = 10*GDrawGetText8Width(gme->g.base,"n", 1, NULL );
+ if ( max < 10*GDrawGetText8Width(gme->g.base,"n", 1) )
+ width = 10*GDrawGetText8Width(gme->g.base,"n", 1);
else
width = max;
if ( gme->col_data[c].me_type==me_stringchoice ||
@@ -331,7 +331,7 @@ return( 0 );
}
if ( gme->col_data[c].title!=NULL ) {
GDrawSetFont(gme->g.base,gme->titfont);
- cur = GDrawGetText8Width(gme->g.base,gme->col_data[c].title, -1, NULL );
+ cur = GDrawGetText8Width(gme->g.base,gme->col_data[c].title, -1);
if ( cur>width ) width = cur;
}
GDrawSetFont(gme->g.base,old);
@@ -642,7 +642,7 @@ static int GMatrixEdit_Expose(GWindow pixmap, GGadget *g, GEvent *event) {
r.x = gme->col_data[c].x + gme->g.inner.x - gme->off_left;
r.width = gme->col_data[c].width;
GDrawPushClip(pixmap,&r,&old);
- GDrawDrawText8(pixmap,r.x,y,gme->col_data[c].title,-1,NULL,fg);
+ GDrawDrawText8(pixmap,r.x,y,gme->col_data[c].title,-1,fg);
GDrawPopClip(pixmap,&old);
}
if ( c!=lastc && !gme->col_data[c].hidden)
@@ -752,7 +752,7 @@ static int GME_RecalcFH(GMatrixEdit *gme) {
end = ept - str;
break;
}
- GDrawGetText8Bounds(gme->nested, str, end, NULL, &bounds);
+ GDrawGetText8Bounds(gme->nested, str, end, &bounds);
free(str);
if ( bounds.as>as )
as = bounds.as;