Hi,
Consider this program:
and the corresponding log:
Notice how title1
has 2 fs that take the same screen space as the single f in title2
.
The output is as expected. It seems the monospace font is causing this.
What could be causing this issue? How to fix it? Can I use a different font? Thanks!
Using firefox under linux. Chromium does not seem to exhibit that behaviour.
Other characters do not seem to exhibit that behaviour either.
Edit:
fi
and ffi
also use the space of a single character:
Alright, after more research, it seems firefox does ligatures automatically while chromium does not. The fonts used are different.
I'm unsure what the correct behaviour is, but SAS/Studio should disable that.
Adding style
font-feature-settings: "liga" 0;
via the page inspector restores the display as it should be.
Since the Program Editor window displays things in MONOSPACE font it is pretty clear from your photograph that the there is a strange non-ASCII character in your first title.
Print that character with the $HEX font to see what actual character it is.
For example the hex codes for lowercase efg is 656667
19 data _null_; 20 string='efg'; 21 put string $hex.; 22 run; 656667
It is probably this character: https://www.compart.com/en/unicode/U+FB00
No. It's a display artifact.
If I type a letter between the 2 fs, the alignment is fine again.
What interface are you using to run SAS?
SAS/Studio? What version of SAS/Studio? What browser are you using? What happens if you use a different browser?
Display Manager? What version of SAS? What operating system?
What interface are you using to run SAS?
SAS/Studio? What version of SAS/Studio? What browser are you using? What happens if you use a different browser?
Display Manager? What version of SAS? What operating system?
I'm using SAS® OnDemand for Academics https://welcome.oda.sas.com/, where SAS/Studio is release 3.81, with Firefox 127 in Mint 21.3 Cinnamon.
This seems to have been a bug in FireFox since at least 2015.
See this question: https://support.mozilla.org/en-US/questions/1046624
You might ask SAS Support if it is possible to modify the CSS they generate when users are using Firefox to add that code to disable the ligatures. Not sure if FireFox has a local setting you can change to disable it yourself.
I installed the stylus extension to add the style that disables ligatures, and contacted tech support.
W3C states that for OpenType fonts, common ligatures (such as ff) are enabled by default.
So maybe FF is doing the correct thing here.
https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#font-variant-ligatures-prop
For some texts like Arabic, ligatures are a must, but for coding they are undesirable.
Hence why SAS/Studio should disable them imho.
To me the issue is with it doing the ligatures in the CODE and LOG windows. But since all of the windows appear in the same browser window perhaps it is not possible to only have it apply to the RESULTS window.
To me the issue is with it doing the ligatures in the CODE and LOG windows. But since all of the windows appear in the same browser window perhaps it is not possible to only have it apply to the RESULTS window.
I think the results window does use an OpenType font, and that font doesn't have any ligatures defined in it. I might be wrong, but that's how I make sense of what we observe.
It is probably this character: https://www.compart.com/en/unicode/U+FB00
After more digging, this seems to take place for small ligature characters FB00 to FB03
So some web component is making that replacement.
That is probably a feature of the font. More specifically the kerning rules for the font. One of the wonders of proportionally spaced fonts.
But I am not sure how you can control it from SAS other than perhaps specifying a different font.
other than perhaps specifying a different font.
Do you know how to do that?
Since it happens in one browser and not the other, I'd see the issue there.
Since it happens in one browser and not the other, I'd see the issue there.
Yep, that makes sense. No other application does that though. Maybe it's a CSS setting in SAS/Studio.
I'm just looking for workaround.
Alright, after more research, it seems firefox does ligatures automatically while chromium does not. The fonts used are different.
I'm unsure what the correct behaviour is, but SAS/Studio should disable that.
Adding style
font-feature-settings: "liga" 0;
via the page inspector restores the display as it should be.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.