Change Atom font - Linux [ Solved ]


#1

Good afternoon,

I want to change Atom font. Not editing font which you can modifiy in settings but the main font who is probably charged from OS at Atom start. It’s not the case for me.

I tried to add this :slight_smile:

"atom-worspace": fontFamily: SF UI Text Regular fontSize: 10

directly in this :

~/.atom/config.json

     "*":

“atom-beautify”:
general:
_analyticsUserId: “57289588-db9f-41e1-814b-7bd69e0b211c”
“atom-toolbar”: {}
core:
autoHideMenuBar: true
closeDeletedFileTabs: true
disabledPackages: [
“minimap”
]
telemetryConsent: "limited"
themes: [
“atom-material-ui”
“atom-material-syntax-dark”
]
editor:
fontFamily: "monaco “
fontSize: 13
preferredLineLength: 200
"exception-reporting”:
userId: “15a8fa26-a35c-48f5-906e-a114b645f779"
“file-icons”: {}
minimap: {}
“status-bar”: {}
“todo-show”:
sortAscending: false
statusBarIndicator: true
"tool-bar”:
position: “Left”
“vim-mode-plus”:
ignoreCaseForSearch: true
ignoreCaseForSearchCurrentWord: true
keymapPToPutWithAutoIndent: true
keymapYToYankToLastCharacterOfLine: true
statusBarModeStringStyle: "long"
useSmartcaseForSearch: true
useSmartcaseForSearchCurrentWord: true
welcome:
showOnStartup: false

Can someone please take a look on it ?

Thank you :slight_smile:

PS : Sorry for my english i’am french…


#2

And sorry with the code balise for .json


#3

Have you read something that indicates that it’s possible to change the font the way you’re trying to? If you want to change the font, the way to do it is through your styles.less file.


#4

I read it on stack or arch forum if i remember good.

I also tried to change directly via style.less following this way [https://atom.io/packages/fonts] but it’s not working also. I tried with font ( helvetica ) who direct comes from archlinux aur repository and with SF UI Text and Helvetica Neue who come from web and are stored in ~/.fonts but still not working.


#5

You can change anything through styles.less. If you add a rule and it doesn’t seem to be working, you need to open the inspector (View -> Developer -> Toggle developer tools) and take a look at which rule is taking priority, then make your rule’s selector specific enough to override that. Or throw an !important into your rule.

If the advice can’t be found again, it might as well not exist.


#6

Ok. Thanks. So i checked dev tools with Ctrl + Shift + i and it’s shows me atom-workspace { display: flex; flex-direction: column; height: 100%; overflow: hidden; position: relative; color: rgba(221, 221, 221, 0.65); background-color: #212121; font-family: 'Roboto', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif; }. I tried an other time to override this by style.less in ~/.atom but still nothing :frowning:


#7

What did you put in styles.less?


#8

atom-workspace { font-family: Helvetica;}

and

! important atom-workspace { font-family: Helvetica;}

I also tried with other fonts like ubuntu regular, cantarell etc etc…

I don’t understand.


#9

You need to use proper CSS/Less syntax. In this video, I add font-family: "Helvetica" to styles.less under atom-workspace.


#10

Ok. Bad syntax. Now it’s works… I’am stupid. I installed my OS by cli but i’am not able to just pay attention to these details in a config file… Sorry & thank you very much for your help and also for the screen ! I found some beautiful things :slight_smile:

I will put this topic in resolved.