BookmarkSubscribeRSS Feed
Sinistrum
Quartz | Level 8

Dear community,

 

I would like to ask for your help concerning the following issue.
First, I would like to apologize in case I posted to the wrong directory, as, in my oppinion, the issue also fits "Graphics Programming".

 

Using proc gplot and the results viewer as destination with a newly-installed font (LM Roman 10), everything works as expected;

using pdf as output destination, single characters of strong are displayed "on top of each other".

2 screenshorts with sample data (for the code, please confer below) shall illustrate the latter case - once using "Arial" (working), once using "LM Roman 10" (issue).

 

arial1.JPGLMRoman1.JPG

 

As the results show up correctly in the results viewer, I wonder, whether this could be due to an issue with my .pdf-settings in general resectively .pdf-settings with regard to SAS.

 

It would be great, if someone were to please help me out on this issue.

 

Yours sincerely,

Sinistrum

 

 

data	have;
	input
		year top bottom;
	datalines
				;
	1990		1	1
	1991		1.1	0.9
	1992		1.2	0.85
	1993		1.25	0.83
	1994		1.28	0.81
	1995		1.35	0.75
	1996		1.4	0.7
				;
run;


title1 "Index-values per year";  
	symbol1
		interpol		=			join 
		value			=			Dot 
		color			=			magenta 
		height			=			0.5;                                                                         
	symbol2
		interpol		=			join
		value			=			Dot 
		color			=			blue 
		height			=			0.5;     
	legend1
		value			=	("Bottom" "Top")
		label			=	("")
		frame;        
	axis1
		label			=			("Year") 
		minor			=			none 
		major			=			none
		;      
	axis2
		label			=			(angle=90 	"Index")  
		; 
ODS
	graphics 
	on 
	;
goptions
	ftext				=		"LM Roman 10"
/*	ftext				=		"Arial"*/
	border 	
	cback				=		white 
	htitle				=		10pt 
	htext				=		10pt
	hsize				=		15cm 
	vsize				=		15cm
;
 ODS	
	pdf
	dpi 		=				350
;

			proc	gplot
				data	=	have;
				plot
					(
								bottom		
								top
					)	*	year
				/
				overlay
					legend		=		legend1
					haxis		=		axis1
					vaxis		=		axis2
					vref		=		1
					;
			run; quit;
ODS
	pdf 
	close
;

 

6 REPLIES 6
ChrisNZ
Tourmaline | Level 20

May the the font is not quite defined correctly and the PDF viewer has trouble spacing the letters as they should be?

Sinistrum
Quartz | Level 8

Thank you for your suggestion.

 

While I do not exclude the option that the fault is on behalf of the font's definition (to the contrary, I assume, it is), using the font in Microsoft Office Word and saving as pdf or alternatively "printing to pdf" not causing an issue, to me provides evidence for the problem being more specific to SAS respectively routines explicitly SAS accesses to create pdfs Microsoft Office Word does not.

 

In terms of viewer-specific problems, opening the SAS-created documents both via Adobe Acrobat X as well as Microsoft Edge causes the issue.

 

As a workaround, I switched to use font “cmr10”, which resembles the LaTeX font I use for the document I need to include the graphical output into just as well and does not cause the issue.

ChrisNZ
Tourmaline | Level 20

Word and SAS may be using different features or different methods to use the font.

You could look at the underlying PDF code and compare how a string is written in both cases (this most likely requires uncompressing the code with a tool such as qpdf).

If you really want 🙂

 

 

Cynthia_sas
SAS Super FREQ
Hi:
You might want to check with Tech Support. Just installing the font on your system so you can use it with Word may not be enough for SAS. I remember in the "old days" having to explicitly register the font with SAS for it to be used in SAS/Graph output.

Cynthia
Sinistrum
Quartz | Level 8

Thank you for this hint.

 

Indeed, I did have to use this, in order to be able to use the various fonts installed after SAS itself already had been installed in the first place.

However, (until now) only "LM Roman 10" causes the issue.

 

Cynthia_sas
SAS Super FREQ
Hi, Honestly, I'd recommend working with the graph experts in Tech Support on this.
Cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1000 views
  • 4 likes
  • 3 in conversation