PDA

View Full Version : [OPEN] Themer 1.3 - local font



Christiand
9 Aug 2017, 4:06 AM
I'm trying to get the new local font feature and it's not working for me.

OS: Windows 7
ExtJs: 6.5.1.345
Themer: 1.2.0.51
SenchaCMD: 6.5.1.240

I can import my font into Themer

56760

Themer UI updates when I select my new font

56761

When I launch my app, the font are not loaded when I look into Chrome inspector.

56762

56763

Finally, when I close my theme in Themer and re-open it, the Font is lost.

Any ideas ?

dan.buhrman
9 Aug 2017, 5:57 PM
Hello,

Can you check the following files and see if everything looks correct to you (or post contents here and I can review)?

[theme_dir]/sass/etc/themer-local-fonts.scss // This contains the @font-face definitions Themer generated based on metadata detected in the font files.
[theme_dir]/resources/fonts/themer-local-fonts // Should contain the font files you added to Themer
[theme_dir]/package.json // Look for "themer" config entry, then "fonts". This should be an array of your font names (VW Head & VW Text)

Also, it would be helpful to take a look at your theme package and/or font files you are trying to use. Let me know if that would be OK with you, and I'll PM you my email address so you can send them.

Christiand
10 Aug 2017, 2:21 AM
Hello!


[theme_dir]/sass/etc/themer-local-fonts.scss // This contains the @font-face definitions Themer generated based on metadata detected in the font files.

File is present with data, however the "src" is empty
56774



[theme_dir]/resources/fonts/themer-local-fonts // Should contain the font files you added to Themer

All my files are available. I have only .otf files, not sure if that is ok.

56775


[theme_dir]/package.json // Look for "themer" config entry, then "fonts". This should be an array of your font names (VW Head & VW Text)

56776


Also, it would be helpful to take a look at your theme package and/or font files you are trying to use. Let me know if that would be OK with you, and I'll PM you my email address so you can send them.

Sure!

dan.buhrman
10 Aug 2017, 5:08 AM
I just sent you a PM with my email address. I can't reproduce your issue locally, however, I'm hoping having your theme package and font files will help me diagnose this issue further.

As for a workaround, it looks like themer-local-fonts.scss was obviously generated wrong by Themer. You can manually modify this file and change/populate the wrong/missing information. It also looks like some font files were detected as 'oblique', but doesn't look like you actually have any oblique style font files in your directory. Themer uses a 3rd party parser to process the font file metadata, which is not a perfect science, and relies on the font creator to set the correct flags in the file.

The 'src' should be set to something like: `src: url($font-path + '/VWHead-Bold.otf') format('opentype');`

Once this file looks good, you should be able to re-open the theme in Themer and see your font applied (assuming this is the only problem).