grid.c, windisp.c, vertical text for postscript and WINGUI
Arial as standard font for WINGUI
This commit is contained in:
parent
f4470dc8a0
commit
8621ded52c
|
|
@ -141,7 +141,13 @@ gr_redrawgrid(GRAPH *graph)
|
|||
graph->fontwidth,
|
||||
(graph->absolute.height * 3) / 4, 0);
|
||||
} else {
|
||||
DevDrawText(graph->grid.ylabel,
|
||||
if (eq(dispdev->name, "postscript") || eq(dispdev->name, "Windows"))
|
||||
DevDrawText(graph->grid.ylabel,
|
||||
graph->fontwidth,
|
||||
/*vertical text, midpoint in y is aligned midpoint of text string */
|
||||
(graph->absolute.height -strlen(graph->grid.ylabel) * graph->fontwidth) / 2, 90);
|
||||
else /* FIXME: for now excluding X11 and others */
|
||||
DevDrawText(graph->grid.ylabel,
|
||||
graph->fontwidth,
|
||||
graph->absolute.height / 2, 90);
|
||||
}
|
||||
|
|
@ -312,6 +318,8 @@ lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis)
|
|||
max = graph->absolute.width - graph->viewportxoff;
|
||||
} else {
|
||||
graph->viewportxoff = (digits + 5 + mag - mag3) * graph->fontwidth;
|
||||
if (graph->grid.ylabel)
|
||||
graph->viewportxoff += graph->fontheight;
|
||||
margin = graph->viewportyoff;
|
||||
/*max = graph->viewport.height + graph->viewportyoff;*/
|
||||
max = graph->absolute.height - graph->viewportyoff;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ extern void com_hardcopy(wordlist *wl);
|
|||
#define M_LN10 2.30258509299404568402
|
||||
#endif
|
||||
|
||||
#define DEF_FONTW "Courier"
|
||||
#define DEF_FONTW "Arial"
|
||||
|
||||
/* local variables */
|
||||
static int IsRegistered = 0; /* 1 if window class is registered */
|
||||
|
|
@ -801,9 +801,6 @@ int WIN_Text( char * text, int x, int y, int angle)
|
|||
tpWindowData wd;
|
||||
HFONT hfont;
|
||||
LOGFONT lf;
|
||||
NG_IGNORE(angle);
|
||||
|
||||
int CentiDegrees = 0;
|
||||
|
||||
if (!currentgraph) return 0;
|
||||
wd = pWindowData(currentgraph);
|
||||
|
|
@ -811,8 +808,8 @@ int WIN_Text( char * text, int x, int y, int angle)
|
|||
|
||||
lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ;
|
||||
lf.lfWidth = 0 ;
|
||||
lf.lfEscapement = CentiDegrees ;
|
||||
lf.lfOrientation = CentiDegrees ;
|
||||
lf.lfEscapement = angle * 10;
|
||||
lf.lfOrientation = angle * 10;
|
||||
lf.lfWeight = 500 ;
|
||||
lf.lfItalic = 0 ;
|
||||
lf.lfUnderline = 0 ;
|
||||
|
|
@ -828,10 +825,8 @@ int WIN_Text( char * text, int x, int y, int angle)
|
|||
(void) lstrcpy(lf.lfFaceName, DEF_FONTW);
|
||||
}
|
||||
if (!cp_getvar("wfont_size", CP_NUM, &(lf.lfHeight))) {
|
||||
lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ;
|
||||
lf.lfHeight = (int) (1.3 * currentgraph->fontheight) ;
|
||||
}
|
||||
|
||||
// lstrcpy (lf.lfFaceName, "Courier"/*"Times New Roman"*/) ;
|
||||
|
||||
hfont = CreateFontIndirect (&lf);
|
||||
SelectObject(wd->hDC, hfont);
|
||||
|
|
|
|||
Loading…
Reference in New Issue