FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Calling files of font like .ttf?
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Calling files of font like .ttf?
Posted: Tue Dec 02, 2008 06:09 PM

Antonio and friends,

Exists a way to call a file of font like .ttf without installing it on windows?

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Font install
Posted: Tue Dec 02, 2008 07:41 PM

Hello JC,

as far as i know, a font must be installed.
That is the problem : If You use nice fonts inside Your
application and it is not installed on the computer of Your customer,
You will have a problem. You have to deliver the font with Your
application as well.
For that reason, it is better to use windows-standard fonts like
Arial, Comic Sans Ms Standard, Ms Sans Serif, Times New Roman....

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Calling files of font like .ttf?
Posted: Tue Dec 02, 2008 07:57 PM
Uwe,

What you think about this way?

Function AddFontResource

Adds a new font to the Windows font table

Syntax:

    AddFontResource( <cFontFile> | <hFontResource> ) \\ <nFontsAdded>

This function add a font resource to the Windows font table. Any application can then use the font.

Parameters:

    <cFontFile> The name of an external file where we have stored some fonts we want to use in our application.
    <hFontResource>The handle of a module (DLL) where we have stored some fonts we want to use in our application.

Returns:

    <nFontsAdded> The number of fonts the system
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Font-install
Posted: Tue Dec 02, 2008 08:05 PM

Hello JC,

I think, it is the same.
You install a font with Your application, instead with the MS-Font-Manager,
but You want to use a NOT installed font ?

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Calling files of font like .ttf?
Posted: Tue Dec 02, 2008 08:10 PM

Uwe,

I found a font to transform codes alphanumerics into bar codes and it's very simple and functional.
I have think if this will be the best solution? Or with highest easy then?

Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Using fonts without install.
Posted: Tue Dec 02, 2008 08:20 PM

Hello JC,

I think, it is the only solution, if You need it.

Regards
Uwe :lol:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion