Skip to main content
davidb64427029
Participant
February 9, 2017
Question

Custom Fonts not Working in RH 2017

  • February 9, 2017
  • 1 reply
  • 1006 views

We license some fonts from myfonts.com for use in our Responsive HTML 5 help. The fonts are referenced in our main project .css and in the layout.css that controls the layout styles.

At the top of both .css files we must include the following @1552174 code before the @11220649-face declaration for the custom fonts:

@1552174 url("//hello.myfonts.net/count/xxxxxx");

I believe this allows myfonts.com to track the number of page views that reference the font.

In RoboHelp 2015, the fonts displayed as expected in the Responsive HTML5 output. However, after generating the same output in the trial version of RH 2017, the fonts only display for styles defined in the layout.css (such as the TOC). The main topic content does not load the fonts as expected and falls back to Arial, which is the second font specified in font-family attributes in our main project .css.

In the Chrome dev console, there is an error message "Failed to Load resource: net:: " that references the @1552174 URL.

Any ideas what could have caused this issue in RH 2017?

This topic has been closed for replies.

1 reply

Jeff_Coatsworth
Community Expert
Community Expert
February 9, 2017

Probably something got busted in this new build - shoot tcssup@adobe.com an e-mail with examples.

Willam van Weelden
Inspiring
February 10, 2017

In addition, the update may have triggered a rewrite of the CSS by RoboHelp. Do you have an old version of the topic CSS lying around? Try restoring the CSS. Also, was the URL changed somehow (by RH in the code)?

Another thing to try: In the output, update the CSS so that it works. Then copy your changes back to the RH version of the CSS file and generate again. Does it still corrupt then?

davidb64427029
Participant
February 10, 2017

Thanks for the quick responses. I did send an email to Adobe Support.

I took Willam's advice and compared the .css source file in my RH2015 and RH2017 projects and found that some changes were made by RH when the project was upgraded:

- Some comments were removed from the start of the css file that seem to include myfonts license details.

- In the font-face declarations for our custom fonts, RH removed the single quote marks around the custom font names.

- The css file size increased from 14KB to 18KB

I replaced the .css file in my 2017 project with the original .css file from my 2015 project and regenerated the output, but the problem still remained. When I looked at the .css in the newly generated output, RH 2017 had made the same changes to the .css file during generation.

I then replaced the .css file in the 2017 output with the .css from my 2015 output, and the custom fonts finally appeared as expected.

So, I do have a workaround for now, but I'd prefer not to have to replace the css in the output every time I generate.

PS - I can share the css files with anyone who is interested in the exact changes that RH 2017 makes - don't want to post them here because they include licensing details specific to my company.