Unique Unicode CSS - Thought

As a writer of Bānglā (language: Bengali), we are dependent on Unicode Bānglā characters. As we all know, Unicode is an extended version of ASCII, and all ASCII characters are still stored in Unicode. Then the remaining symbols of the world were added. Now Bangla and other languages ​​are worried (it could be Chinese, Hebrew, Japanese, or Javanese), we have glyphs in Unicode.

But in Bānglā, anxiety is font-size: 100% for English characters is not enough for Bānglā characters. Due to the position of the glyphs inside each grid. This can be understood from the following image:

Bānglā and English glyphs in grid

While the English character fits largely into the grid, the Bānglā character is compressed to fit into it due to other supporting glyph characters.

Therefore, although we set body{font-size: 100%} , this is good for English glyphs, but with the same CSS it shows that Bānglā fonts are smaller.

DECISION, NOW
Currently, as we make this decision, we need to choose a good font that has both good English and Bānglā icons, i.e. "Siyam Rupali". Thus, he solves the problem very little.

NEW THOUGHT

But what I think is a little new:
& Rdquo; Why don’t we focus on Unicode characters and set specific CSS code just for them?

Suppose that the Unicode number #0048 4614 5784 4578 represents the first Bānglā character, and #0048 4614 5784 9999 last. So, if we can do some CSS, for example:

 Unicode[glyph="0048461457844578" - "0048461457849999"]{ font-size: 150%; } 

I know that in CSS there is nothing like the above. But is there a way to target certain glyphs to different CSS styles on em?

If there is a way, then many of the Binng Unicode users will benefit, especially most of the Bānglā online newspaper needs such content tuning to achieve dynamic control.

+6
source share
1 answer

This is completely a font problem. If you choose a well-balanced font in which the sizes of the glyphs are adjusted so that the mixed text in the language looks good together, there is no real problem. CSS can help you here, as you can specify custom fonts for specific characters using @font-face :

 @font-face { font-family: 'bangla'; src: url('http://example.com/mybangla.ttf'); unicode-range: U+0980-09FF; } 

This fictional bangla font now only applies to the Unicode range U + 0980 - U + 09FF, which is a Bengal block. Choose multiple fonts wisely and you can create a well-balanced look in modern browsers.

+5
source

Source: https://habr.com/ru/post/956310/


All Articles