1 /************************************************************************/
2 /*									*/
3 /*  Utility functions around text attributes.				*/
4 /*									*/
5 /************************************************************************/
6 
7 #   include	"utilPsConfig.h"
8 
9 #   include	"textAttributeUtil.h"
10 #   include	<geoGrid.h>
11 #   include	"psFontInfo.h"
12 
13 /************************************************************************/
14 /*									*/
15 /*  Translate twips to pixels.						*/
16 /*									*/
17 /************************************************************************/
18 
textGetPixelSize(double pixelsPerTwip,const TextAttribute * ta)19 int textGetPixelSize(		double				pixelsPerTwip,
20 				const TextAttribute *		ta )
21     {
22     int			twipsSize= 10* ta->taFontSizeHalfPoints;
23 
24     if  ( ta->taSuperSub == TEXTvaSUPERSCRIPT		||
25 	  ta->taSuperSub == TEXTvaSUBSCRIPT		)
26 	{
27 	return COORDtoGRID( pixelsPerTwip, SUPERSUB_SIZE( twipsSize ) );
28 	}
29     else{
30 	return COORDtoGRID( pixelsPerTwip, twipsSize );
31 	}
32 
33     }
34 
35