packaging fonts into module

Post Reply
neve
Posts: 7
Joined: Thu Apr 21, 2022 6:17 pm

packaging fonts into module

Post by neve »

Hello I am trying to package a third-party font into my mudlet module/package. The wiki docs give this information:
To install a new font with your package, include the font file in your zip/mpackage and it'll be automatically installed for you.
It's not completely clear to me where in the mpackage zip it belongs. Must it be in the root of the zip, or can it be anywhere? How does "automatically" identify font files in either case? If it is not automatically made available, what debugging steps are recommended?

Is there a way to load a specific font file from a specific location outside of this process? A common font license forbids distributing fonts directly but does allow downloading them, but it seems like this automatic process precludes that entirely.

Thanks.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: packaging fonts into module

Post by Vadi »

It can be anywhere, and they are identified using the filename extension.

> Is there a way to load a specific font file from a specific location outside of this process?

no, but are you sure you'll be able to download it even in that case using Mudlet? Typically these things require using a browser

neve
Posts: 7
Joined: Thu Apr 21, 2022 6:17 pm

Re: packaging fonts into module

Post by neve »

Any debugging advice on if a font isn't made available automatically? This doesn't seem to work for me at all.


> no, but are you sure you'll be able to download it even in that case using Mudlet? Typically these things require using a browser

Yes, it's not a browser license it just doesn't allow distributing the font as part of a software package. Fetching it via api with license key in the request is fine.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: packaging fonts into module

Post by Vadi »

See if the filename ends on .ttf or .otf. Otherwise, compare getAvailableFonts() before and after package loading?

neve
Posts: 7
Joined: Thu Apr 21, 2022 6:17 pm

Re: packaging fonts into module

Post by neve »

It is a .ttf and getAvailableFonts() is how I was checking for it. I see all of my system fonts, and it shows up there if I add it to my system globally. It's not just this font either, I can't get any to become available by putting them in the mpackage zip.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: packaging fonts into module

Post by Vadi »

Alright, those were my off the top of the head ideas - anything else would require a deeper dive to see what's going wrong here.

neve
Posts: 7
Joined: Thu Apr 21, 2022 6:17 pm

Re: packaging fonts into module

Post by neve »

Yeah I kinda figured, thanks for the help. I think that is going to be the final nail for mudlet for this project then unfortunately. It doesn't support screenreaders and it doesn't support custom fonts except in this specific inflexible way that also doesn't work. You really don't have any other visually impaired users of this thing or?

User avatar
demonnic
Posts: 884
Joined: Sat Dec 05, 2009 3:19 pm

Re: packaging fonts into module

Post by demonnic »

Actually, screenreader support is in the PTB version and should be included in the Mudlet 4.17.0 release, barring major catastrophes in testing between now and then.

I just tested and my Mudlet 4.16.0 is loading several test ttf files into the list of available fonts on profile load. It may just require closing and restarting the profile after downloading the font the first time. What OS are you using, perhaps there's an issue on one OS in particular I'm not seeing? Running on Windows 10 right now.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: packaging fonts into module

Post by Vadi »

Custom fonts do work, others are using them successfully.

Post Reply