cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add font style?

SOLVED

How to add font style?

Hi,

 

Can I add my own font file (* .TTF) as a resource for "Vuforia Studio" instead of an external font?
Can I use the resource font I have added?
Or is it possible to use only external fonts via unconditional URL like below?

@import url (// fonts.googleapis.com/css?family=Bowlby One);
.specialfont {
  font-family: 'Bowlby One';
}

Thanks,

 

Warm Regards,

SeonHo

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to add font style?

Hello CHASEONHO

Maybe this will help. I prefer to store different fonts in Resources\Fonts folder:

 

/// Creating a new font style:
@font-face {
font-family: digital;
src: url('#{$resources}/Fonts/DIGITALDREAM.ttf');
}

/// Using the new font style:
.digital {
font-family: digital;
}

Regards

 

Tomas

4 REPLIES 4

Re: How to add font style?

@CHASEONHO Custom CSS can be added easily in the application CSS section, if you also have custom files to add to the project with the font definitions, you can upload them via the resources upload action and then reference them from the CSS file.

 

Adding fonts to the CSS file via CSS import should work, and one can also add fonts via javascript in the home.js file by creating the link tag with the URL to the font.

I think the 3d label widget can use the CSS fonts if they exist already in the page.  See some examples about how to import fonts such from this post:

https://stackoverflow.com/questions/14676613/how-to-import-google-web-font-in-css-file

  @import url('https://fonts.googleapis.com/css?family=Open+Sans')

 

-Durgesh

Re: How to add font style?

Hello CHASEONHO

Maybe this will help. I prefer to store different fonts in Resources\Fonts folder:

 

/// Creating a new font style:
@font-face {
font-family: digital;
src: url('#{$resources}/Fonts/DIGITALDREAM.ttf');
}

/// Using the new font style:
.digital {
font-family: digital;
}

Regards

 

Tomas

Re: How to add font style?

Thank you for answer.
That's correct!
Is there a way to add as a default resource without adding fonts to every project?

Re: How to add font style?

Just a note that I was seeing an issue with local custom fonts on iOS a few months back. Not sure if this has been resolved.

https://community.ptc.com/t5/Studio/Custom-Fonts-not-working-on-iOS/m-p/609780