Utilizing CSS @Font-Face / Google Fonts provides varying dimensions for numerical characters and alphabets

When using the code below, the text Hello 7432832 KB is displayed with the letters appearing larger than the digits by a few pixels. However, this issue does not occur when viewing it in Google Fonts:

Here's the code:

@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
    
body {
  font-family: "Source Sans Pro";
  font-weight: normal;
  font-style: normal;
  font-variant: normal;
}
<body>Hello 7432832 KB</body>

Any thoughts on how to fix this issue?

Answer №1

It seems like there's an issue with the font itself - when used in small sizes, it looks distorted, but at larger sizes (like in the standard Google Fonts preview), it appears fine.

This is incredibly frustrating. I've spent way too much time trying to fix this problem.

I'm going to report a bug on the Github repository.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to incorporate PHP into handling data from 6 separate select elements on a form?

I've recently started delving into PHP and ran into a roadblock when trying to duplicate a piece of code multiple times. I ensured that each element had its own unique variables and was correctly linked to the corresponding name attributes in the inpu ...

Ensure that all lists are aligned on the left side, from the numbers to

Trying to implement a solution for aligning numbers and text in an ordered list within a border. Found a helpful answer on Stack Overflow: Left align both list numbers and text Encountering an issue where long content in one list item overlaps into the n ...

Adding CSS files to a JSP page in Spring MVC

This is how my project's structure looks like: webapp: resources: css: test.css WEB-INF: pages: mvc-dispatcher-servlet.xml web.xml I am working on including a .css file in my jsp. mv ...

The expansion animation for the Nextjs/React accordion box did not work as expected when utilizing tailwindcss

I am currently working on creating an animation for a collapsible box (accordion). My goal is to have the child component initially hidden with display:none. When I hover over the parent component, the child should be revealed and the dimensions of the pa ...

Utilizing a StyledComponents theme within a Component

When creating a style called Link, the theme is contained inside of this.props. How can the theme be extracted from props and passed into the Link styled component? Error: ReferenceError - theme is not defined import React from 'react'; impo ...

Is there a way to evenly space out the buttons in the Nav element with more room in between each one?

I need the buttons to be evenly spaced with more room between them. And, of course, they need to be responsive in the end. I attempted to use Bootstrap's "d-flex" class to arrange the buttons, but it didn't work as expected. If you review my Boo ...

Safari's approach to image height measurement

I am experiencing an issue with some images in Safari. While they display correctly on other browsers, the images are appearing too high on Safari. You can view the website at development.mar-bakker.nl <div class="col-xs-12 col-sm-4 col-md-4"> ...

Incorporate a captivating background image into your SVG design

Currently working with Snap.svg, my aim is to include a background image on a polygon shape. The specific polygon in question is outlined as follows: <svg id="test" height="600" width="600" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink= ...

I encountered a SyntaxError indicating a missing ")" right before utilizing jQuery in my code

When trying to run the code below, I encountered an error in the console stating SyntaxError: missing ) after argument list. $(document).ready(function() { $(".blog-sidebar-form form").before("<p class="blog-sidebar-inform>Dummy Text</ ...

Ways to align list items in the middle of a webpage with CSS

Currently, I am working on a website and looking to create a customized list where the pictures act as clickable links. You can check out the website here. My goal is to have the links adjust to align left based on the browser size, and also have the imag ...

Center the "td" elements within a table

I am struggling with a design that involves two tables placed side by side within a main table. <table> <tr> <td style="width: 50%"> <table id="table1"> <tr><td></td></tr> <tr><td></t ...

Click here for more navigation options

I'm looking to enhance my navigation bar by adding an additional section that expands underneath when a specific button is clicked. Think of it like the functionality on the Apple Store website where clicking on a product reveals another bar. https:/ ...

Adjusting the header row to match the width of the data row in an HTML table

I am facing an issue with the layout of my HTML table. I have set space between each cell using margin, but this is causing a problem with column width. Instead of having col-12 for a row, it has become col-11 due to the spacing. This has resulted in the h ...

Place elements in relation to the ancestor of their parent

Is it feasible to position elements in relation to the ancestors of their parents? <div id='div1'> <div id='div2'> <input type='button' class='btn'> button 2</button> <inp ...

Is there a way to ensure that the div is displayed on the same line?

Check out the jsfiddle link provided: http://jsfiddle.net/HE7yT/ I'm trying to align the Image, content, and Amount in the same line. How can I achieve this? The goal is to have "150" displayed on the same line as the picture. var HTML = $(' ...

Displaying jQuery Slide Elements in a row instead of stacking them on top of each other

I created a tutorial box with 4 slides (2 for this (demo)). My goal is to make the slides slide from right to left when the user clicks next. I have been able to achieve this, however, the elements are displaying on top of each other instead of side by si ...

The div in tailwind/css does not expand as expected

I am facing an issue where the light blue div is not taking up the entire screen space as intended. In addition, the dark blue div is visible even when there is no content in it, while the light blue one remains hidden despite setting max-height (I also tr ...

Initiating change upon componentDidMount

Seeking advice on implementing a transition with react and css. The goal is to apply a class to the span element to achieve the desired animation effect – see illustration below. Curious to know whether the issue lies in the css implementation or the ja ...

Tips for preventing CSS conflicts when incorporating an Angular 6 application into another application

We recently developed an Angular 6 web application and now we want to seamlessly integrate it into one of our client's online store. However, we are facing some CSS conflict issues: For instance: - The webshop is built on Bootstrap 3 while our app u ...

Font modification is unsuccessful in Vue-Material

Here is a snippet from my App.vue file where I encountered an issue with changing the font in the md-tabs component, taken from . The CSS line: background: #42A5F5; works perfectly fine, but this one does not: color: #E3F2FD; App.vue: <template> ...