Remove previously disabled code.
This commit is contained in:
parent
a2afd5b8ad
commit
c4e40d8f9e
|
@ -264,36 +264,6 @@ BOOL PSDRV_GetTextMetrics(DC *dc, TEXTMETRICW *metrics)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/***********************************************************************
|
||||
* PSDRV_UnicodeToANSI
|
||||
*/
|
||||
char PSDRV_UnicodeToANSI(int u)
|
||||
{
|
||||
if((u & 0xff) == u)
|
||||
return u;
|
||||
switch(u) {
|
||||
case 0x2013: /* endash */
|
||||
return 0x96;
|
||||
case 0x2014: /* emdash */
|
||||
return 0x97;
|
||||
case 0x2018: /* quoteleft */
|
||||
return 0x91;
|
||||
case 0x2019: /* quoteright */
|
||||
return 0x92;
|
||||
case 0x201c: /* quotedblleft */
|
||||
return 0x93;
|
||||
case 0x201d: /* quotedblright */
|
||||
return 0x94;
|
||||
case 0x2022: /* bullet */
|
||||
return 0x95;
|
||||
default:
|
||||
WARN("Umapped unicode char U%04x\n", u);
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* PSDRV_UVMetrics
|
||||
*
|
||||
|
@ -336,31 +306,6 @@ const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm)
|
|||
/***********************************************************************
|
||||
* PSDRV_GetTextExtentPoint
|
||||
*/
|
||||
#if 0
|
||||
BOOL PSDRV_GetTextExtentPoint( DC *dc, LPCWSTR str, INT count,
|
||||
LPSIZE size )
|
||||
{
|
||||
PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
|
||||
INT i;
|
||||
float width;
|
||||
|
||||
width = 0.0;
|
||||
|
||||
for(i = 0; i < count && str[i]; i++) {
|
||||
char c = PSDRV_UnicodeToANSI(str[i]);
|
||||
width += physDev->font.afm->CharWidths[(int)(unsigned char)c];
|
||||
/* TRACE(psdrv, "Width after %dth char '%c' = %f\n", i, str[i], width);*/
|
||||
}
|
||||
width *= physDev->font.scale;
|
||||
TRACE("Width after scale (%f) is %f\n", physDev->font.scale, width);
|
||||
|
||||
size->cx = GDI_ROUND((FLOAT)width * dc->xformVport2World.eM11);
|
||||
size->cy = GDI_ROUND((FLOAT)physDev->font.tm.tmHeight * dc->xformVport2World.eM22);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL PSDRV_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count, LPSIZE size)
|
||||
{
|
||||
PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
|
||||
|
@ -386,23 +331,6 @@ BOOL PSDRV_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count, LPSIZE size)
|
|||
/***********************************************************************
|
||||
* PSDRV_GetCharWidth
|
||||
*/
|
||||
#if 0
|
||||
BOOL PSDRV_GetCharWidth( DC *dc, UINT firstChar, UINT lastChar,
|
||||
LPINT buffer )
|
||||
{
|
||||
PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
|
||||
UINT i;
|
||||
|
||||
TRACE("first = %d last = %d\n", firstChar, lastChar);
|
||||
|
||||
if(lastChar > 0xff) return FALSE;
|
||||
for( i = firstChar; i <= lastChar; i++ )
|
||||
*buffer++ = physDev->font.afm->CharWidths[i] * physDev->font.scale;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL PSDRV_GetCharWidth(DC *dc, UINT firstChar, UINT lastChar, LPINT buffer)
|
||||
{
|
||||
PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
|
||||
|
|
|
@ -112,11 +112,6 @@ static char psrrectangle[] = /* x, y, width, height, -width */
|
|||
"%d 0 rlineto\n"
|
||||
"closepath\n";
|
||||
|
||||
#if 0
|
||||
static char psshow[] = /* string */
|
||||
"(%s) show\n";
|
||||
#endif
|
||||
|
||||
static const char psglyphshow[] = /* glyph name */
|
||||
"/%s glyphshow\n";
|
||||
|
||||
|
@ -639,46 +634,6 @@ BOOL PSDRV_WriteReencodeFont(DC *dc)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
BOOL PSDRV_WriteShow(DC *dc, LPCWSTR str, INT count)
|
||||
{
|
||||
char *buf, *buf1;
|
||||
INT buflen = count + 10, i, done;
|
||||
|
||||
buf = (char *)HeapAlloc( PSDRV_Heap, 0, buflen );
|
||||
|
||||
for(i = done = 0; i < count; i++) {
|
||||
char c = PSDRV_UnicodeToANSI(str[i]);
|
||||
if(!isprint(c)) {
|
||||
if(done + 4 >= buflen)
|
||||
buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
|
||||
sprintf(buf + done, "\\%03o", (int)(unsigned char)c);
|
||||
done += 4;
|
||||
} else if(c == '\\' || c == '(' || c == ')' ) {
|
||||
if(done + 2 >= buflen)
|
||||
buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
|
||||
buf[done++] = '\\';
|
||||
buf[done++] = c;
|
||||
} else {
|
||||
if(done + 1 >= buflen)
|
||||
buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
|
||||
buf[done++] = c;
|
||||
}
|
||||
}
|
||||
buf[done] = '\0';
|
||||
|
||||
buf1 = (char *)HeapAlloc( PSDRV_Heap, 0, sizeof(psshow) + done);
|
||||
|
||||
sprintf(buf1, psshow, buf);
|
||||
|
||||
PSDRV_WriteSpool(dc, buf1, strlen(buf1));
|
||||
HeapFree(PSDRV_Heap, 0, buf);
|
||||
HeapFree(PSDRV_Heap, 0, buf1);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL PSDRV_WriteShow(DC *dc, LPCWSTR str, INT count)
|
||||
{
|
||||
char buf[128];
|
||||
|
|
Loading…
Reference in New Issue