Skip to content
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

Load font from storage? #901

Closed
Merith-TK opened this issue Aug 7, 2019 · 14 comments
Closed

Load font from storage? #901

Merith-TK opened this issue Aug 7, 2019 · 14 comments

Comments

@Merith-TK
Copy link

Basically, i want to install a font into my msys system, and have mintty load said font without it being installed on the Windows PC, this is useful because i intend on taking my msys2 setup with me to my school. where i wont have Adminperms, or even cmd.exe shell access. I plan on storing the font in /opt/fonts/hack.ttf

@mintty
Copy link
Owner

mintty commented Aug 7, 2019

I see the use case but by the paradigm of Windows and considering that mintty is a Windows application, fonts need to be installed in Windows. There is hardly a way to change this. Rather than using Windows font rendering, you would have to integrate some 3rd-party font rendering engine (e.g. Pango) and then output graphics instead of text, which might make output considerably slower in addition.

@mintty
Copy link
Owner

mintty commented Aug 7, 2019

Maybe you'd like to try https://www.no-nonsens.nl/temporary-font-manager/.

@Biswa96
Copy link
Contributor

Biswa96 commented Aug 7, 2019

Warning: Before doing anything in school pc ask teachers first. I've learnt it from past.

@Merith-TK
Copy link
Author

Merith-TK commented Aug 8, 2019 via email

@Merith-TK
Copy link
Author

@mintty that font loader actually appears to work. Going to send it to my District IT to see if it able to be used on the locked down system

@mintty
Copy link
Owner

mintty commented Aug 8, 2019

For the library approach, https://en.wikipedia.org/wiki/Category:Text_rendering_libraries lists some that might be suitable, in theory.

@Merith-TK
Copy link
Author

okay, that label Difficulty-Insane is pretty funny

@mintty
Copy link
Owner

mintty commented Oct 16, 2020

Actually, this turned out to be much easier, using Windows function AddFontResourceEx.
Introduced new configuration subfolder fonts to drop dynamic fonts.
A portable installation would need to provide its config tree and set it in the invocation via command line parameter --configdir.

@Merith-TK
Copy link
Author

Wouldnt it be easier to read minttyrc file from the default location?

AS i generally use mintty with msys2, and PortableAppsPlatform, the latter does not support per app command arguments

@mintty
Copy link
Owner

mintty commented Oct 16, 2020

There are multiple default locations. The $APPDATA/mintty location is not portable. The /usr/share/mintty location can be used, of course, as a portable invocation will create its own portable cygwin environment. I'll adapt the docs.

@Merith-TK
Copy link
Author

alright, thanks for the information,

@mintty
Copy link
Owner

mintty commented Oct 16, 2020

Actually, my comment above wasn't well-crafted but the docs are OK. I could mention /usr/share/mintty explicitly in the wiki Tips file in case that's not obvious.

@Merith-TK
Copy link
Author

Yeah, that would be a good idea, definately would bring more awareness to this new feature

@mintty
Copy link
Owner

mintty commented Oct 24, 2020

Released 3.4.1.

@mintty mintty closed this as completed Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants