Jump to content

Recommended Posts

Posted
Greetings,
I'm getting trouble to include a font in the server. It works from a external server, but doesn't if I include the file from my own server. It's an HTTP Status 401 - Unauthorized.
 
Is this related to unigui? How can I solve this? 
 
Thanks in advance

 

  • 2 weeks later...
Posted

Hello thiago.ferreira,

to enable the fonts in your application you must add the MimeType.

add the file extensions that you want to allow.

in the OnCreate event ServerModule add:

eg .ttf extension

MimeTable.AddMimeType('ttf', 'application/font', False);
  • Upvote 1
Posted

Hi Marlon,

 

I try to do what you said, using Open San font in my Application. What I did:

 

1. Add MimeTable.AddMimeType('ttf', 'ventas/font', False); in the servermodule OnCreate event. 
2. Create the folder font in my application folder ventas.
2. Install Open San Windows/Font (this allow me to use the font within Unigui (Labels, panels, etc...)
3. Copy Fonts files to ventas/Font directory, as i understood you explain.
4. Compile the app.
5. Run it local and remote. And the font is not Open San, is something like Roman....
 
What did i did wrong. Thanks in advanced.
 
Rafael Liriano
  • 3 weeks later...
Posted

You have to load the font to your webbrowser.

 

See here...

 

Best practice:

1. Install the font on your developer computer

2. Add the font to your project as described in the link above

3. Change the font of the unigui components in your project as needed..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...