BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ChrisNZ
Tourmaline | Level 20

Hi,

Consider this program:

ChrisNZ_0-1719724406491.png

and the corresponding log:

ChrisNZ_1-1719724448565.png

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.

ChrisNZ_2-1719724548963.png

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:

ChrisNZ_0-1719749567636.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

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.

ChrisNZ_0-1719802629650.png

 

 

View solution in original post

14 REPLIES 14
Tom
Super User Tom
Super User

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.

Tom_0-1719750266399.png

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

 

ChrisNZ
Tourmaline | Level 20

No. It's a display artifact.

 

ChrisNZ_0-1719752890955.png

If I type a letter between the 2 fs, the alignment is fine again.

Tom
Super User Tom
Super User

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?

 

ChrisNZ
Tourmaline | Level 20

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.

 

 

 

 

Tom
Super User Tom
Super User

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.

ChrisNZ
Tourmaline | Level 20

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.

 

 

Tom
Super User Tom
Super User

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.

ChrisNZ
Tourmaline | Level 20

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.

ChrisNZ
Tourmaline | Level 20

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

ChrisNZ_0-1719799031941.png

So some web component  is making that replacement.

Tom
Super User Tom
Super User

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.

ChrisNZ
Tourmaline | Level 20

other than perhaps specifying a different font.

Do you know how to do that?

ChrisNZ
Tourmaline | Level 20

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.

ChrisNZ
Tourmaline | Level 20

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.

ChrisNZ_0-1719802629650.png

 

 

SAS Innovate 2025: Register Now

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!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 14 replies
  • 2517 views
  • 0 likes
  • 3 in conversation