laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
46.11k stars 5.02k forks source link

Allowing to select custom fonts #337

Closed despens closed 4 years ago

despens commented 6 years ago

It would be nice if the application would respect the desktop environment's fonts or allow to set them manually. I believe there is only a proportional and a non-proportional option required?

Operating system

Application

dayfuaim commented 6 years ago

Yes, and I think that Android version also needs this. Especially, monospaced font in editor.

despens commented 6 years ago

This is already "50% done" since it has become possible to change the editor monospace font :smiley:

despens commented 6 years ago

The monospace font is not used when rendering backticked markdown:

selection_00640

laurent22 commented 6 years ago

The monospace font is not used when rendering backticked markdown

This is as expected since the font at the moment is only to customise the editor.

Tommy-01 commented 5 years ago

The font in the writeable note window, is just to small. An option to change the size of the font, without knowing of css or anything like this would be nice.

Torsten-K commented 5 years ago

The font in the writeable note window, is just to small. An option to change the size of the font, without knowing of css or anything like this would be nice.

The font size is too small for me, too.

josemariagarcia95 commented 5 years ago

Yup, the size is a problem.

I had to switch to the dark theme because, with the white one, the part of some letters was barely visible. Being able to customize the font family and size on the writable note window would be awesome.

Outi-s commented 5 years ago

@josegarciaclm95 did you try changing font & font size in userstyle.css?

Torsten-K commented 5 years ago

[…] did you try changing font & font size in userstyle.css?

I cannot find such a file on Ubuntu 18.04, I looked for it in /home/[…]/.config/Joplin/ and /home/[…]/.config/joplin-desktop/, and Catfish (a file searcher) did not find userstyle.css or any other CSS file. I have Joplin-1.0.120-x86_64.AppImage.

josemariagarcia95 commented 5 years ago

@subi54 I didn't know about the existance of that file, but your comment made me look closely on the General settings page and I found the Editor font size and the Editor font options.

I might make a pull request after modifying the layout, UX can be improved easily as far as I can tell.

Thank you for pointing that out @subi54 !

Outi-s commented 5 years ago

@Torsten-K I'm unfamiliar with Linux/Ubuntu but try making a new file: userstyle.css. It might work.

@josegarciaclm95 css doesn't work for you?

body {
    font-face: Menlo;
    font-size: 12px/em;
}

Should work or whatever your preferences are. Also, I am unsure if vw(viewport) value works with this. Something to look into.

You'll have to restart after changing the css values.

Edit: From Joplin's homepage: Rendered markdown can be customized by placing a userstyle file in the profile directory ~/.config/joplin-desktop/userstyle.css (This path might be different on your device - check at the top of the Config screen for the exact path). This file supports standard CSS syntax.

josemariagarcia95 commented 5 years ago

@subi54 I didn't find that file, but my comment was made from a user point of view. Setting the general preferences worked for me.

Outi-s commented 5 years ago

@josegarciaclm95 Alright, good to know.

dayfuaim commented 5 years ago

Editor in Android build still needs monospace font.

rcarmo commented 5 years ago

Another call for custom font selection - I need that in iOS since the defaults are hard to read for me.

Torsten-K commented 5 years ago

@subi54: Making a new file called userstyle.css in the folder /home/[…]/.config/joplin-desktop/ with font stylings has an effect Joplin 1.0.165 (AppImage for GNU/Linux). @josemariagarcia95: Changing the font for the editor in the preferences also works,

Thank you, guys! And forgive me for commenting so late, but I hadn't used Joplin for a while.

stale[bot] commented 5 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "backlog" and I will leave it open. Thank you for your contributions.

Torsten-K commented 5 years ago

Since version 1.0.169 or so, the editor’s font size is configurable, so from my side the topic can be closed.

dayfuaim commented 5 years ago

@Torsten-K Yes, of course.

And what about not only Default or Monospace, but custom .ttf? At least in plans.

funkrusher commented 4 years ago

in visual-studio code i can import fonts via the css import-command. This does not seem to work in the userstyle.css of joplin.

For example: i want to use the exellent LaTeX Font "Computer Bright" which is available as a web-font. See. https://github.com/dreampulse/computer-modern-web-font

In visual-studio code i can just drop the font into the folder on the local filesystem and load it with the following import-commands:

@import url("./font/Bright/cmun-bright.css");
@import url("./font/Bright Semibold/cmun-bright-semibold.css");
@import url("./font/Classical Serif Italic/cmun-classical-serif-italic.css");
@import url("./font/Concrete/cmun-concrete.css");
@import url("./font/Sans/cmun-sans.css");
@import url("./font/Sans Demi-Condensed/cmun-sans-demicondensed.css");
@import url("./font/Serif/cmun-serif.css");
@import url("./font/Serif Slanted/cmun-serif-slanted.css");
@import url("./font/Typewriter/cmun-typewriter.css");
@import url("./font/Typewriter Light/cmun-typewriter-light.css");
@import url("./font/Typewriter Variable/cmun-typewriter-variable.css");
@import url("./font/Upright Italic/cmun-upright-italic.css");

body {
  font-family: "Computer Modern Serif", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  font-size: 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Computer Modern Typewriter", sans-serif;
  }
  h1 small,
  h2 small,
  h3 small,
  h4 small,
  h5 small,
  h6 small {
    line-height: 0;
    color: #999999; }

h1 {
  font-family: "Computer Modern Typewriter", serif !important;
}
...

It would be great if you could make this available for joplin, because then we users have all the power of using custom fonts as we like and style them with help of css.

stale[bot] commented 4 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

stale[bot] commented 4 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.