Font used to display code
-
Hi all Is there a way to change the font CP uses to display code snippets in articles? My new tablet is currently showing code in Courier New and I always code in a non serif font. Regards
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com
-
Hi all Is there a way to change the font CP uses to display code snippets in articles? My new tablet is currently showing code in Courier New and I always code in a non serif font. Regards
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com
Do you have Consolas installed? The CSS for the code shows:
font-family: Consolas, "Courier New", Courier, mono
So Courier New is a "fallback" font, if Consolas isn't installed. (You can see this by using Chrome Inspect, then looking at the Computed tab for the element.)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Do you have Consolas installed? The CSS for the code shows:
font-family: Consolas, "Courier New", Courier, mono
So Courier New is a "fallback" font, if Consolas isn't installed. (You can see this by using Chrome Inspect, then looking at the Computed tab for the element.)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Many thx OG, I'll pursue that idea. [Update] Bummer. Consolas is a MS font and appears not to be available on Android. Would it be feasible to have a fallback for Consolas in the same way there is a fallback for Courier New?
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com
-
Many thx OG, I'll pursue that idea. [Update] Bummer. Consolas is a MS font and appears not to be available on Android. Would it be feasible to have a fallback for Consolas in the same way there is a fallback for Courier New?
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com
Might be a dumb idea, but can you download a font you like and rename it so your browser thinks it's consolas?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
Many thx OG, I'll pursue that idea. [Update] Bummer. Consolas is a MS font and appears not to be available on Android. Would it be feasible to have a fallback for Consolas in the same way there is a fallback for Courier New?
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com
Yeah, totally. I'll just replace courier with monospace which will be Droid Sans Mono on Android
cheers Chris Maunder
-
Yeah, totally. I'll just replace courier with monospace which will be Droid Sans Mono on Android
cheers Chris Maunder
Thx Chris, that would totally rock.
.dan.g. AbstractSpoon Software email: abstractspoon(dot)todolist(at)gmail(dot)com