The R Project SVN R

Rev

Rev 18202 | Rev 19875 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18202 Rev 19598
Line 861... Line 861...
861
	code == 0241			||   /* Upsilon1 */
861
	code == 0241			||   /* Upsilon1 */
862
	code == 0242			||   /* minute */
862
	code == 0242			||   /* minute */
863
	code == 0245			||   /* infinity */
863
	code == 0245			||   /* infinity */
864
	code == 0260			||   /* degree */
864
	code == 0260			||   /* degree */
865
	code == 0262			||   /* second */
865
	code == 0262			||   /* second */
-
 
866
	code == 0266                    ||   /* partialdiff */
866
	0)
867
	0)
867
	return code;
868
	return code;
868
    else
869
    else
869
	return 0;
870
	return 0;
870
}
871
}
Line 1598... Line 1599...
1598
}
1599
}
1599
AccentTable[] = {
1600
AccentTable[] = {
1600
    { "hat",		 94 },
1601
    { "hat",		 94 },
1601
    { "ring",		176 },
1602
    { "ring",		176 },
1602
    { "tilde",		126 },
1603
    { "tilde",		126 },
-
 
1604
    { "dot",            215 },
1603
    { NULL,		  0 },
1605
    { NULL,		  0 },
1604
};
1606
};
1605
 
1607
 
1606
static int AccentCode(SEXP expr)
1608
static int AccentCode(SEXP expr)
1607
{
1609
{
Line 1637... Line 1639...
1637
    code = AccentCode(accent);
1639
    code = AccentCode(accent);
1638
    if (code == 0)
1640
    if (code == 0)
1639
	InvalidAccent(expr);
1641
	InvalidAccent(expr);
1640
    bodyBBox = RenderElement(body, 0);
1642
    bodyBBox = RenderElement(body, 0);
1641
    italic = bboxItalic(bodyBBox);
1643
    italic = bboxItalic(bodyBBox);
-
 
1644
    if (code == 215) /* dotmath */
-
 
1645
	accentBBox = RenderSymbolChar(code, 0);
-
 
1646
    else
1642
    accentBBox = RenderChar(code, 0);
1647
	accentBBox = RenderChar(code, 0);
1643
    width = max(bboxWidth(bodyBBox) + bboxItalic(bodyBBox),
1648
    width = max(bboxWidth(bodyBBox) + bboxItalic(bodyBBox),
1644
		bboxWidth(accentBBox));
1649
		bboxWidth(accentBBox));
1645
    xoffset = 0.5 *(width - bboxWidth(bodyBBox));
1650
    xoffset = 0.5 *(width - bboxWidth(bodyBBox));
1646
    bodyBBox = RenderGap(xoffset, draw);
1651
    bodyBBox = RenderGap(xoffset, draw);
1647
    bodyBBox = CombineBBoxes(bodyBBox, RenderElement(body, draw));
1652
    bodyBBox = CombineBBoxes(bodyBBox, RenderElement(body, draw));
Line 1650... Line 1655...
1650
    xoffset = 0.5 *(width - bboxWidth(accentBBox))
1655
    xoffset = 0.5 *(width - bboxWidth(accentBBox))
1651
	+ 0.9 * italic;
1656
	+ 0.9 * italic;
1652
    yoffset = bboxHeight(bodyBBox) + bboxDepth(accentBBox) + 0.1 * XHeight();
1657
    yoffset = bboxHeight(bodyBBox) + bboxDepth(accentBBox) + 0.1 * XHeight();
1653
    if (draw) {
1658
    if (draw) {
1654
	PMoveTo(savedX + xoffset, savedY + yoffset);
1659
	PMoveTo(savedX + xoffset, savedY + yoffset);
-
 
1660
	if (code == 215) /* dotmath */
-
 
1661
	    RenderSymbolChar(code, draw);
-
 
1662
	else
1655
	RenderChar(code, draw);
1663
	    RenderChar(code, draw);
1656
    }
1664
    }
1657
    bodyBBox = CombineOffsetBBoxes(bodyBBox, 0, accentBBox, 0,
1665
    bodyBBox = CombineOffsetBBoxes(bodyBBox, 0, accentBBox, 0,
1658
				   xoffset, yoffset);
1666
				   xoffset, yoffset);
1659
    PMoveTo(savedX + width, savedY);
1667
    PMoveTo(savedX + width, savedY);
1660
    return bodyBBox;
1668
    return bodyBBox;