2
Hi, I’m making use of the Raleway font of CDN Google Fonts, but the numbers seem floating, the serif for the letters are good, clean, but for the numbers has a "dropped" aspectI thought I’d use another source for the numbers but the problem is I have over 500 pages in the project and a few pages are static content, I wondered if there’s any way to change the typography of the numbers through some regular expression in javascript, recognizing numbers and numbers 123123
and inserts a tag <span class='fontNum'>123123</span>
but with some caveats.
For unique numbers:
<span class='fontNum'>1</span>
For numbers with more than one digit:
<span class='fontNum'>1234</span>
For an ex format, CPF:
<span class='fontNum'>111.111.111-00</span>
And not:
<span class='fontNum'>111</span>.<span class='fontNum'>111</span>.<span class='fontNum'>111</span>-<span class='fontNum'>00</span>
If you can help me with the three formats I will do the other formats based on the last of the CPF.
The change would only be aesthetic in the DOM, I believe that with javascript the reading of the robots would not have problems in attaching the strings in the way that came from the database or that are inserted in the static HTML, because I believe that robots read the processed HTML and not how the code was after all javascript executed. This way the HTML is complete and the numbers changed only on the user screen.
If in fact the searchers do not read the modified code in the DOM by javascript, it could still look like this:
<span class='fontNum'>111</span>.<span class='fontNum'>111</span>.<span class='fontNum'>111</span>-<span class='fontNum'>00</span>
did not work, they continue "loose/dancers", was not aligned as the typography of letters, I clicked on perform in the example above and also were "loose/dancers".
– ElvisP
@Eliseub. Dude I don’t know why it didn’t work here Snippet is perfect in Chrome, using Windows. I tested in Firefox and everything as expected tb... http://prntscr.com/n1h84u look at the image ai in the link, print direct from the site in Firefox
– hugocsl
I’m making use of Firefox 66.0 and it didn’t work, but if you have an average support for using the variant I don’t know if it’s a good idea. To make the javascript maneuver is expensive, I will probably go back to the font Lato that I think rubber but the customer likes.
– ElvisP
*not average, until it’s a broad support, but I don’t know what happened and it didn’t work, nor in your example.
– ElvisP
@Eliseub. I can’t explain why it didn’t work there... I just found this example here, https://codepen.io/rlchy/pen/YPmYQQ look if it works there. If it doesn’t work the problem is with your Font probably... http://prntscr.com/n1hc6w image here
– hugocsl
This is how https://fonts.googleapis.com/css?family=Lato:400,700|Raleway:300,400,500
– ElvisP
@Eliseub. maybe it’s because you’re using it in the format
.woff2
but only testing on other platforms to know... Using Google Fonts CDN worked well...– hugocsl
by CDN did not roll, I downloaded the sources and installed on the server and it worked, thanks for everything and patience.
– ElvisP
@Eliseub. No problem at all
– hugocsl
the reference of the property on the site of Mozilla is complete, won the day
– ElvisP