blocknotes / activeadmin_blaze_theme

A theme for Active Admin based on Blaze CSS 3.x
MIT License
46 stars 12 forks source link

Roboto Font #19

Closed kusihed75 closed 3 years ago

kusihed75 commented 3 years ago

Hi,

in the app/assets/stylesheets/activeadmin_blaze_theme/theme.scss you import the font this way:

@import url('https://fonts.googleapis.com/css?family=Roboto');

As I noticed it doesn't render font weight like bold in a nice way, these elements are somehow blurry.

Like described in https://stackoverflow.com/questions/21332475/bold-fonts-in-google-chrome-are-blurry-font-face these elements would look nicer if the font was imported with:

@import url('https://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold');

That's what I do for now in my active_admin.scss, so there is the desired look and feel.

What do think about changing that in your gem? Would it be a good change request?

Best regards

blocknotes commented 3 years ago

Hi @kusihed75. Thank you for your issue, that's interesting.

I think that the only drawback could be that each font weight is a separate font file and will slow down the first page load times a bit. But it shouldn't be a big issue and each version should be downloaded only if a page include a specific font weight (probably it will get only regular and bold most of the times).

I'll investigate a bit more, but it could be an improvement.

Fs00 commented 3 years ago

I stumbled upon this issue and decided to try the proposed fix in our application. For bold, the difference is really noticeable and makes the text much more legible, especially on Chrome when the text is small. For italic, instead, there was almost no difference.

In the end we went with: @import url('https://fonts.googleapis.com/css?family=Roboto:regular,bold');

We didn't test medium and thin weights so I don't know if it's worth adding them too.

blocknotes commented 3 years ago

Included in version 0.7.8, thank you for the report.