There are more than 500 lines of code to include two custom fonts. Is there a way to optimize this?
->> http://pastebin.com/pUL9sGwr
-
This topic was modified 10 years by
Catalin.
Hello newt-on,
If you want to load more custom fonts in our theme you can do this from Theme panel->Custom Fonts area -> http://screencast.com/t/0NLB57GJXH -> http://screencast.com/t/TTsBBIUiw
Please follow the guide to this topic and try to load the custom font using this method -> https://forum.tagdiv.com/topic/fonts-upload-problem/
Hope this helps and let us know how it goes!
Thank you for the message!
No, the result is fine. I uploaded my fonts due to your guides and they are used.
But the theme created 500 lines of code in the plain HTML of every site and I think there should be a better option to accomplish that. It seems like you include the font for every single area they are used without looking for if they were already included.
-
This reply was modified 10 years by
newt-on.
Hello newt-on,
This is the method of implementation of the fonts which theme uses. All the fonts which are loaded you can see inline on this line in your page source, like this -> http://screencast.com/t/SrDsAd0Z and then is created an HTML file and you can find the CSS code for each font.
Thank you for your understanding!
I’m not quite sure you are understanding my comment.
I have a site. I’m using the newspaper theme. I use custom fonts as explained in your tutorials. For the user it works fine, but source code is a mess. You can look at the sourcecode of http://sozialmarketing.de/ lines 215 to 806 are filled with CSS @font-face instructions.
Since in the Theme setting there are only three custom font files it is not neccessary to include nearly one hundred of them.
So my question is either if I have done something wrong and there is a way that all this can be merged in a css file? Or if it’s a bug or a problem with other plugins? Or if it’s bad coding?
Hello newt-on,
I have checked your page source and I saw the fonts loading. This kind of issue appears only when you load the custom fonts from the Theme panel. Indeed, this is an issue with our theme and we will try to fix it in next update.
Thank you for your understanding and sorry for the inconvenience!