-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Implement title with font name and style elements (or Postscript name) #38
Comments
This seems like a really nice idea, but unfortunately I am not able to work on this project for some time because I currently do not have access to a Linux machine. I will be able to work on this in a month or two. |
@emk2203 Are you sure the complex line is necessary? Because it works fine for me: I am using Manjaro Linux, which distro are you on? |
The issue is not with the distribution (I use Ubuntu 20.04), but with the fonts used:
with
So, with fonts which contain only English language description, it is no problem. Whenever you get a font which contains descriptions in many languages, like most professional fonts, it's looking ugly and confusing. That's the reason for the complex line. Most OSS fonts don't have this issue, but there are still enough who have, like Free Mono. It's in the |
Ah okay that makes sense. I will start working on this as soon as I can 👍 |
Ooo fancy ✨ |
Please implement a title in the font preview window, which should show the font name and style or the postscript name.
Use case
Fonts have often misleading names, sometimes still in the DOS 8.3 naming convention. For similar-looking fonts, it's not easy to see which font it really is if you don't see the real font name embedded in the font. Font names like
bookosb.ttf
andbookosbi.ttf
don't tell much if you need a certain font, for example in LibreOffice which shows the real font names and not the file names.Example code
fc-scan --format "%{fullname[$(( $(sed -E 's/^(.*)en.*/\1/;s/[^,]//g' <<<"$(fc-scan --format "%{fullnamelang}\n" /mnt/Fonts/bookosb.ttf)" | wc -c) -1 ))]}\n" /mnt/Fonts/bookosb.ttf
is a way to retrieve the font name wherever
fontconfig
is installed, so practically everywhere on Linux. The complex line is necessary because a simplefc-scan --format "%{fullname}\n"
would return something likeBookman Old Style Negreta,Bookman Old Style tučné,Bookman Old Style fed,Bookman Old Style Fett,Bookman Old Style Έντονα,Bookman Old Style Bold,Bookman Old Style Negrita,Bookman Old Style Lihavoitu,Bookman Old Style Gras,Bookman Old Style Félkövér,Bookman Old Style Grassetto,Bookman Old Style Vet,Bookman Old Style Halvfet,Bookman Old Style Pogrubiony,Bookman Old Style Negrito,Bookman Old Style Полужирный,Bookman Old Style Fet,Bookman Old Style Kalın,Bookman Old Style Krepko,Bookman Old Style Lodia
instead of just
Bookman Old Style Bold
Alternatively,
fc-scan --format "%{postscriptname}\n"
is simpler, but returnswhich needs to be parsed by the user to get the proper name for linux use.
The text was updated successfully, but these errors were encountered: