Automatically use @font-face

Issues related to previewing and publishing your web site.
Post Reply
User avatar
crispy68
 
 
Posts: 706
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Automatically use @font-face

Post by crispy68 » Mon Nov 11, 2019 5:51 pm

Hey Pablo,

Ran across an issue with setting @font-face as 'Automatically use @font-face for non web-safe fonts'. I do have generate external CSS and global styles enabled.

Very simple to reproduce:

1. Insert a text object and change it to a non web-safe font that is not a google font either.
2. Set the @font-face as above.
3. Preview

In my case, when I previewed it the font was changed to something else. The font did not show correctly. It only seemed to work when I set the text object to either 'Enable Responsive Fonts' or if the Output Format was set to 'Use <p> tags'. If Output format is only set to 'default' and you don't enable responsive fonts, it doesn't work correctly.

The html in either case is the same. Here is what that looks like:

Code: Select all

<div id="wb_Text1"><span id="wb_uid0">Some text here</span></div>
In looking at the code, the CSS is different in each case:

Default:

Code: Select all

#wb_Text1{position:absolute;left:215px;top:256px;width:399px;height:54px;text-align:center;z-index:0;}
#wb_uid0{color:#404040;font-family:Bauhaus 93;font-size:48px;}
With responsive fonts:

Code: Select all

#wb_Text1{color:#404040;font-family:"Bauhaus 93";font-weight:normal;font-size:48px;}
#wb_Text1{position:absolute;left:215px;top:256px;width:399px;height:54px;text-align:center;z-index:0;}
#wb_uid0{color:#404040;}
When it works, it appears the font code is applied to the text object ID rather than the ID of the <span> tag that is generated.

User avatar
Pablo
 
Posts: 18940
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Automatically use @font-face

Post by Pablo » Mon Nov 11, 2019 6:16 pm

I am not sure if this related to responsive fonts, I think it's related to the selected font.
As documented in the help, the option 'Automatically use @font-face' does not work with all fonts. In some cases the font name cannot be looked up in the registry to locate the font data. Or it cannot be converted to other formats, due to corrupt or missing header info.

User avatar
crispy68
 
 
Posts: 706
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Automatically use @font-face

Post by crispy68 » Mon Nov 11, 2019 6:20 pm

Hey pablo,

Everything else works. It creates the correct at font face code in the global stylesheet. It creates the truetype and woff font and places it in the root folder.

It was only the CSS code that I noticed that was different. Everything else was exactly the same

User avatar
Pablo
 
Posts: 18940
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Automatically use @font-face

Post by Pablo » Mon Nov 11, 2019 6:25 pm

In that case, I need a demo project, so I can see the exact settings.

User avatar
crispy68
 
 
Posts: 706
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Automatically use @font-face

Post by crispy68 » Mon Nov 11, 2019 7:31 pm

sent to you privately.

User avatar
Pablo
 
Posts: 18940
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Automatically use @font-face

Post by Pablo » Mon Nov 11, 2019 9:35 pm

The issue is related to the name of the font.
I will investigate if I can find a workaround for this.

Post Reply