[SOLVED] How to use fonts located in a specific folder

Just starting out? Need help? Post your questions and find answers here.
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

[SOLVED] How to use fonts located in a specific folder

Post by boddhi »

Hi,

As said the title, under Windows, there is a way to use fonts located in specific folders.
I want to do a catalog for my fonts located in a external drive.
I've tested LoadFont(x,"Path:\FontName.ttf"), no result...

I did some research and found this post. But even if I enter a path and a font name, I get no results too.
Maybe it's just not possible?
Last edited by boddhi on Tue Jan 16, 2024 1:43 pm, edited 1 time in total.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: How to use fonts located in a specific folder

Post by jacdelad »

LoadFont is for using fonts registered by Windows. Try RegisterFontFile.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: How to use fonts located in a specific folder

Post by boddhi »

jacdelad wrote: Tue Jan 16, 2024 12:12 pm LoadFont is for using fonts registered by Windows. Try RegisterFontFile.
Thanks for your reply.

I tried that too but didn't work.
But I realized that I had made a error in the code. I used DrawingFont(FontNbr) instead of DrawingFont(FontId(FontNbr)). :oops: :oops: :oops:
Sorry :oops: :wink:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: [SOLVED] How to use fonts located in a specific folder

Post by jacdelad »

I do this mistake regularly. :lol: Also I often miss the ImageID() when using images somewhere.
Last edited by jacdelad on Fri Jan 19, 2024 8:36 am, edited 1 time in total.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 487
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: [SOLVED] How to use fonts located in a specific folder

Post by Mindphazer »

jacdelad wrote: Wed Jan 17, 2024 5:38 am I do this mistake regularly. :lol: Also I oftne miss the ImageID() when using images somewhere.
Glad to know i'm not the only one. I feel less lonely now :mrgreen:
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: [SOLVED] How to use fonts located in a specific folder

Post by boddhi »

jacdelad wrote: I do this mistake regularly. :lol:
Mindphazer wrote: Glad to know i'm not the only one. I feel less lonely now :mrgreen:
I'm so relieved to see that more experienced programmers than me are still doing this kind of crap. :mrgreen: :wink:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 487
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: [SOLVED] How to use fonts located in a specific folder

Post by Mindphazer »

I'm so relieved to see that more experienced programmers than me are still doing this kind of crap. :mrgreen: :wink:
I would never claim to be more experienced than others :P
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
jacdelad
Addict
Addict
Posts: 2032
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: [SOLVED] How to use fonts located in a specific folder

Post by jacdelad »

boddhi wrote: Fri Jan 19, 2024 2:07 am I'm so relieved to see that more experienced programmers than me are still doing this kind of crap. :mrgreen: :wink:
Can't say a word about Mindphazer, but I'm totally not more experienced. :D
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Post Reply