WindowsFont

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

WindowsFont

Post by AZJIO »

WindowsFont

Font changes in the Windows interface.

Download: yadi.sk, upload.ee

Image

Update
Added DPI calculation and font size calculation.
Changing the font size in the names of files and folders in the explorer is applied instantly, the rest requires the user to log out / log in.
Window resizing is supported.
Last edited by AZJIO on Sat Mar 05, 2022 12:08 pm, edited 4 times in total.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: WindowsFont

Post by Kwai chang caine »

Thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: WindowsFont

Post by AZJIO »

Update
Added DPI calculation and font size calculation.

Code: Select all

Define hDC, DPI, PointSizeб lfHeight

hDC = GetWindowDC_(0)
DPI = GetDeviceCaps_(hDC, #LOGPIXELSY)
ReleaseDC_(0, hDC)

PointSize = 12
; MulDiv -> wilbert -> https://www.purebasic.fr/english/viewtopic.php?p=423001
lfHeight = -MulDiv(PointSize, DPI, 72)
Debug lfHeight
Debug -MulDiv(lfHeight, 72, DPI) ; reverse operation
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: WindowsFont

Post by infratec »

Apropo fonts ...

google allows to use there 1364 fonts for free ..

https://fonts.google.com/knowledge
(nearly at the bottom)
Post Reply