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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to add font style?

CHASEONHO
18-Opal

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

ACCEPTED SOLUTION

Accepted Solutions
TomasCharvat
14-Alexandrite
(To:CHASEONHO)

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

View solution in original post

4 REPLIES 4
dupatel
19-Tanzanite
(To:CHASEONHO)

@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

TomasCharvat
14-Alexandrite
(To:CHASEONHO)

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

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

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

Announcements

Top Tags