BookmarkSubscribeRSS Feed
OS2Rules
Obsidian | Level 7

Hi All:

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.

6 REPLIES 6
ballardw
Super User

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.

Cynthia_sas
SAS Super FREQ

Hi: 

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:

http://support.sas.com/rnd/base/new92/92fonts.html

http://support.sas.com/kb/39/766.html

http://support.sas.com/documentation/cdl/en/proc/63079/HTML/default/viewer.htm#n1qkz0fkux9gkan1f96x9...

  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:

http://support.sas.com/resources/papers/proceedings10/033-2010.pdf

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.

cynthia

OS2Rules
Obsidian | Level 7

Cynthia:

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.

Cynthia_sas
SAS Super FREQ


Hi:

  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).

cynthia

OS2Rules
Obsidian | Level 7

Cynthia:

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:

  proc template;

  define style styles.test;

    parent=styles.minimal;

    style Container /

          font=('Arial,Helvetica,Helv',2, normal);

    style RowHeader from RowHeader /

          font=('Arial,Helvetica,Helv',2, Bold normal)

          pretext='<NOBR>'

          posttext='</NOBR>';

    style Data      from Data      /

          pretext='<NOBR>'

          posttext='</NOBR>';

    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);

    end;

    run;

Cynthia_sas
SAS Super FREQ

Hi:
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.)

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1357 views
  • 0 likes
  • 3 in conversation