As you will see in the images, the system detects that these two string
have 4 characters UTF-8
, it is a view html
, bone that is accessible from the browser:
//1234
//عباس
but when placing them one below the other they are not aligned, in the text with Arabic characters there is a loss of pixel space which I attribute to the fonts.
I implement normalize
version 8.0.1
for the css reset.
I have tried to use these fonts: consola
, monospace
and jetbrain mono
without any positive result.
I have investigated what font can display this correctly aligned and I find that when entering the browser console it looks like this, almost perfectly aligned but with a minimum increase in pixels:
I tried to investigate what Font and setting it uses devtools
but google chrome browser
I found absolutely nothing in the documentation, I just need how they apply the font of the html code viewer and what font they use.
Try to validate what it looks like in my IDE I use PHPStorm and guess what it looks like:
perfectly aligned; I validate the font and setting
of my IDE and they are these:
I implement the same in my HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Code">
<style>
body, span {
font-family: "Fira Code", monospace !important;
line-height: 1.2;
font-size: 12px;
}
</style>
</head>
and on the website it continues to display badly:
I can't find what I'm doing wrong?
This is what comes out in the google chrome CSS viewer:
update
and this is what happens when you have data in different languages: view on website
Doing tests I have seen that the Courier source achieves a result, if not exact, at least quite close to what you need.