Font not updating

Post Reply
blevine11
Posts: 2
Joined: 22 May 2018, 21:51

26 May 2018, 03:34

I downloaded the sample designer app to give it a try, but I'm unable to update the font when following the directions in the documentation. Here are the steps I followed:

1. Downloaded roboto fonts and added them to the fonts folder.

2. Within _fonts.scss I added the followoing.

Code: Select all

/* roboto-300 - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  src: url('./fonts/roboto-v18-latin-300.eot'); /* IE9 Compat Modes */
  src: local('Roboto Light'), local('Roboto-Light'),
      url('./fonts/roboto-v18-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
      url('./fonts/roboto-v18-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
      url('./fonts/roboto-v18-latin-300.woff') format('woff'), /* Modern Browsers */
      url('./fonts/roboto-v18-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
      url('./fonts/roboto-v18-latin-300.svg#Roboto') format('svg'); /* Legacy iOS */
}
/* roboto-regular - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/roboto-v18-latin-regular.eot'); /* IE9 Compat Modes */
  src: local('Roboto'), local('Roboto-Regular'),
      url('./fonts/roboto-v18-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
      url('./fonts/roboto-v18-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
      url('./fonts/roboto-v18-latin-regular.woff') format('woff'), /* Modern Browsers */
      url('./fonts/roboto-v18-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
      url('./fonts/roboto-v18-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}
/* roboto-700 - latin */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/roboto-v18-latin-700.eot'); /* IE9 Compat Modes */
  src: local('Roboto Bold'), local('Roboto-Bold'),
      url('./fonts/roboto-v18-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
      url('./fonts/roboto-v18-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
      url('./fonts/roboto-v18-latin-700.woff') format('woff'), /* Modern Browsers */
      url('./fonts/roboto-v18-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
      url('./fonts/roboto-v18-latin-700.svg#Roboto') format('svg'); /* Legacy iOS */
}
3. In _variable.scss I updated fontFamily.

Code: Select all

//Global
$fontFamily:"Roboto","Helvetica Neue",sans-serif;
When the app refreshes all fonts are set to: "Open Sans","Helvetica Neue",sans-serif

Any idea what I'm doing incorrectly here?

blevine11
Posts: 2
Joined: 22 May 2018, 21:51

27 May 2018, 15:53

Figured out the issue.

In the example app the font is being set in layout.css and not within theme.css.

Therefore, if you follow the instructions in the docs, you won't see the fonts update in the example app.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 Jun 2018, 08:33

We'll check and get back to you.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Jun 2018, 10:29

I guess you have a misunderstanding, changing the $fontFamily variable only effects the components, layout is fixed to Open Sans. Still to prevent confusion, we'll also apply that variable to layout as well.

Post Reply

Return to “PrimeNG Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests