Closed munzirtaha closed 3 weeks ago
Hi @munzirtaha, yes things have definitely changed a lot!
The fonts are actually hardcoded in the package lib files, not exposing to users. So for the moment users cannot change the fonts in metadata.toml
without having to touch manually the package folder (it's deep in the typst datadir
.
Do you think this is somehow imperative for you? Since this is the very first issue/discussion about changing the fonts, I was wondering what's the motive behind, and if you could show me the fonts you used with the previous versions of this template.
Definitely, it’s imperative. I even wonder how come no one complain yet!
I see you have a font option for non-latin. If this is working, this would be the first time I see a case where non-latin scripts have better support and flexibility than latin ;) [lang.non_latin] name = "王道尔" font = "Heiti SC"
But for latin script here are my reasons:
First, font preferences vary from user to user. I prefer a script font for my name so I used “Script MT”
Second, I prefer to use symbols which has a unicode value whenever possible. This is much better for compatibility and would guarantee the document shows properly for any user who doesn’t have those symbol fonts installed. e.g. I needed the 🥋 (U+1F94B: MARTIAL ARTS UNIFORM) in my skills section, so I used Noto Emoji
Third, I needed many symbols for free software like the icons for Arch Linux, GNU, … which are neither Unicode nor in Font Awesome so I had to replace Font Awesome with Symbols Nerd
My final settings were
Well heard! I will work on this and deliver it within the next milestone, it should be rather simple.
@munzirtaha do you care to test out the PR if you know how to do so? It should be good by my side.
Once validated, I will submit a PR to Typst package repo with v2.0.2
.
Sure, I will be glad to test but not sure what's the easiest way. I tried to compile utpm
using cargo install --git https://github.com/Thumuss/utpm
but that failed in my Arch Linux with
Compiling utpm v3.0.0 (~/.cargo/git/checkouts/utpm-a7b43f176b778978/da719ee)
error[E0658]: use of unstable library feature 'absolute_path'
--> src/utils/paths.rs:13:23
|
13 | Ok(str) => Ok(path::absolute(str)?.to_str().unwrap().to_string()),
| ^^^^^^^^^^^^^^
|
= note: see issue #92750 <https://github.com/rust-lang/rust/issues/92750> for more information
Umm that's weird. This goes beyond my scope so pity that I can't help you with this.
You might also just git clone
this repo and symlink/copy to the directory where Typst stores its packages. To my information, it should be $XDG_DATA_HOME
or ~/.local/share
on Linux according to the package repo
So the final path should be something like ${XDG_DATA_HOME}/typst/packages/preview/brilliant-cv/2.0.1
.
Thanks! I did as per your instructions and tested the PR and it looks great. Only one thing remaining. The icons for phone and email seems still hardcoded to fontawesome. It also needs to be exposed to the user.
You also need to allow changing font sizes ;)
Great to hear!
Regarding the icons, no further support will be provided for demands of this sort, unfortunately. Feel free to discover and test out the custom
feature for headerInfo, it should help you get what you want.
For the font size, it sounds reasonable for me. Please raise another issue for this demand (and also for details like, global font sizes, or you want more granular settings, etc). I will consider what I can do.
Great. I agree. I can open other issues and discuss it there
It's too long since I visited this project and it seems things has changed. I can no longer find how to change the fonts! I installed it using the recommended
typst init @preview/brilliant-cv:2.0.1
Then Igrep
'ed for the default fontsrg Roboto .
but nothing came out. I couldn't find a discussion section on the project, so I had to open an issue. Thanks in advance.