04-11-2012 10:36 AM
We are testing our code which currently runs on 9.1 (Windows) on 9.3
I've noticed that there are a number of issues that seem to have been introduced with version 9.2, which we have skipped over and subsequently never corrected in our programs. Obviously we want to try to catch these before we commit to using 9.3
Now I've just noticed that all the fonts (and the font heights) of a large number of ODS generated HTML pages are different than the were under 9.1. We use a slightly modified template to create these pages, but never explicitly specify any fonts. Is there a default font (and height) used by ODS HTML that has changed between versions and is there a simple way to select the behavior as it was in 9.1?
I looked at the sources of the different HTML pages, and neither have any fonts coded which leads me to think this is some kind of default.
I also seem to remember that there was a document describing this, that I read somewhere, but I can't seem to find it in any of the 'what changed in 9.2' literature.
Thanks in advance.
04-11-2012 07:41 PM
I'm not sure if my experience exactly matches yours but I did get some unexpected appearance behavoirs with templates created unter 9.2 when run under 9.2.3 In my case I had created the templates by inheritance with changes to font color. When run under 9.2.3 the appearance did not match. I examined the source code of the template inherited from and discovered LOTS of changes in that source. So it looked like some what I was "inheriting" using my older code wasn't there to inherit. I had to change my template code to re-inherit for the newer 9.2 version matching the newer references and things worked out.
04-11-2012 08:32 PM
There were major font changes between SAS 9.1.3 and SAS 9.2. For one thing, SAS uses a slightly different font rendering routine, so SAS comes supplied with a set of TrueType fonts which were not available in SAS 9.1.3. So where you might have seen "Courier New" for a particular style element in the past, you might now see "Cumberland AMT" in their style template (or in the SAS registry). For example, an item in the SAS registry might be a font setting for MTMonospace -- on my system, this font is Cumberland AMT -- on some other system, it might be Courier New or SAS Monospace. At any rate, this font change happened between 9.1.3 and 9.2.
Some references about font changes -- which actually had the most impact on SAS/GRAPH output -- are here:
The whole style template inheritance model also changed between SAS 9.1.3 and SAS 9.2. The bottom line is that the need for the REPLACE statement (and the REPLACE statement) went away due to the style template reworking. The CLASS statement and the "new" inheritance model essentially replaced the REPLACE statement. I talked about this (a bit) in my Style Template paper from a few years ago:
and this paper goes into more detail on the topic: http://www2.sas.com/proceedings/sugi31/053-31.pdf
If you have having unresolvable issues with fonts or template inheritance, then you should open a track with Tech Support.
04-12-2012 09:02 AM
Thanks for all the information - I will take some time to read all the documents you referenced.
I think my problem is that I can't identify which fonts are being used to create the HTML because no fonts are referenced in my code or in the HTML generated.
I'm guessing that my altered template, which uses the MINIMAL template as the parent, is inheriting fonts from that template and this, in part, has changed between releases. It looks like I will need to look into this template to see which fonts are used.
04-12-2012 09:21 AM
STYLES.MINIMAL does not have a parent template. In SAS 9.1.3, the browser (or rendering software) default would have been used. In SAS 9.2 and higher, STYLES.MINIMAL has an implicit parent BASE.TEMPLATE.STYLE -- but again, there are no font references in this template, just the inheritance model, so I would expect that the browser software (or rendering software, if you are not opening the HTML file with a browser) would be in control. The one exception to this rule (that I can think of) would be graphical output -- of course that does need a font in order for the image to be made, so in either case, I would expect the SAS/GRAPH fonts (or ODS GRAPHICS fonts) to be used. The graph fonts changed between 9.1.3 and 9.2 -- so I can imagine a difference in graphical output easier than I can imagine a difference in HTML output. I no longer have 9.1.3 or 9.2 to do anything with.
But, at this point, you might just want to open a track with Tech Support. They have multiple versions of SAS available and you could send them your template and your code and they can help you zero in on the font differences. (And I assume that you have verified that the application opening the HTML file has not changed default fonts -- for example, my Word changed from Arial to Calibri sometime between Office 2003 and Office 2010).
04-12-2012 11:54 AM
Thanks again. I have been fiddling with my template and I think I have figured out the majority of the changes that I need to make to have my page look almost the same as it was under 9.1.
My only problem seems to be on the table cell borders - in 9.1 the border was just a thin black line and I can't figure the options to get it back - it's now gray with a small bit of white space within.
Here is the template that I'm using (now) under 9.1 - I have added the TABLE definitions to try to get the lines as they were before:
define style styles.test;
style Container /
style RowHeader from RowHeader /
font=('Arial,Helvetica,Helv',2, Bold normal)
style Data from Data /
STYLE Table from table /
CELLSPACING = 0
CELLPADDING = 4
borderwidth = 1;
style systemtitle from systemtitle /
font=('Arial,Helvetica,Helv',5, Bold normal);
style systemfooter from systemfooter /
font=('Arial,Helvetica,Helv',2, Bold normal);
style Header from Header /
font=('Arial,Helvetica,Helv',2, Bold normal);
04-12-2012 01:30 PM
Look at one of the templates like DEFAULTor RTF or PDF or ANALYSIS or STATISTICAL. You are looking for RULES, FRAME and BORDERCOLOR settings. Generally, setting CELLSPACING to 0 has the side effect of removing the interior table lines. I'd recommend running some test code using one of these other styles, opening your output in Excel. When you see a style that has the lines you want, go to that template and copy all the RULES, FRAME, BORDERSPACING, CELLSPACING, BORDERWIDTH, etc and colors that you find. (I think that for Excel a BORDERWIDTH of 1 is too small -- you might need to bump that up to at least 2 or 3 and make sure that BORDERCOLOR=BLACK -- I'm teaching now, and not on a computer with SAS, so I can't check.)