Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: 4ST Using Custom Fonts  (Read 9683 times)
Sean H.
Posts: 29


« on: February 16, 2018, 06:54:13 am »

Hello everyone. I know you can use custom ttf files for Icons by mapping them in the
image2font.txt file but I was wondering if it's possible to use ttf files for general application
fonts instead of the default Serifs and Sans-Serifs.
Reuben B.
Four Js
Posts: 1126


« Reply #1 on: February 19, 2018, 06:50:11 am »

Hi Sean,

You may need to rephrase your question to say what it is you are trying to achieve.

The fontfamily field used in .4st can reference any font that is installed on the front-end. 

So in theory, I can take a .ttf font-file, install it onto my Mac, add the appropriate entry in the .4st, and display the appropriate characters from that font-file.  For example I found I could download the .ttf FontAwesome font file from the internet, install it onto my Mac, add the entry in .4st, and display characters using that font to a field and I'd get the FontAwesome characters in a label.  Hardest bit was finding the appropriate number to use in a DISPLAY ASCII(number) TO label

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Rodrigo V.
Posts: 11


« Reply #2 on: March 08, 2018, 02:37:39 pm »

Hi Reuben and Sean,

And... is there any 'easy way' to detect if the specified font is available on the frontend system? or maybe a 'easy way' to install it from GDC? we just did some changes in the GWC-JS to embed the 'Open Sans' font with succes but no way to do the same in GDC

Thanks!
Rodrigo
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines