notofonts / devanagari

Noto Devanagari
SIL Open Font License 1.1
1 stars 2 forks source link

Devanagari: Unable to get svarita and diirgha svarita to render correctly #15

Closed aupasana closed 2 years ago

aupasana commented 8 years ago

From https://groups.google.com/d/msg/sanskrit-programmers/84SkQLKsFvU/NXE4BA5iBQAJ

We see different behaviour when we reference the noto sans devanagari font from Github, early access and fonts.googleapis.com/css. The dirgha svarita and a few other glyphs only render when we reference the ttf file directly. However, in that case, the normal svarita (on the last two words) should probably be rendered like the second and third lines below. How do we accomplish this?

image

<html>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <head>
  <style>
/* Directly linking to the latest version of the font in the Github repo. */
@font-face {
        font-family: 'Noto Sans Devanagari From Github Hinted';
        font-style: normal;
        font-weight: 400;
        src: url(https://raw.githubusercontent.com/googlei18n/noto-fonts/master/hinted/NotoSansDevanagari-Regular.ttf) format('truetype');
}

/* Based on https://fonts.googleapis.com/earlyaccess/notosansdevanagari.css (via http://www.google.com/fonts/earlyaccess) */
@font-face {
        font-family: 'Noto Sans Devanagari From Early Access';
        font-style: normal;
        font-weight: 400;
        src: url(https://fonts.gstatic.com/ea/notosansdevanagari/v3/NotoSansDevanagari-Regular.eot);
        src: url(https://fonts.gstatic.com/ea/notosansdevanagari/v3/NotoSansDevanagari-Regular.eot?#iefix) format('embedded-opentype'),
             url(https://fonts.gstatic.com/ea/notosansdevanagari/v3/NotoSansDevanagari-Regular.woff2) format('woff2'),
             url(https://fonts.gstatic.com/ea/notosansdevanagari/v3/NotoSansDevanagari-Regular.woff) format('woff'),
             url(https://fonts.gstatic.com/ea/notosansdevanagari/v3/NotoSansDevanagari-Regular.ttf) format('truetype');
}

/* Based on https://fonts.googleapis.com/css?family=Noto+Sans:400&subset=devanagari */
@font-face {
        font-family: 'Noto Sans Devanagari From Googleapis';
        font-style: normal;
        font-weight: 400;
        src: url(https://fonts.gstatic.com/s/notosans/v6/5pCv5Yz4eMu9gmvX8nNhfYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
        unicode-range: U+02BC, U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200B-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}

body {
        font-size: 2em;
}
  </style>
  </head>

<body>
<div style="font-family: 'Noto Sans Devanagari From Github Hinted'">पादो᳚ऽस्य  ए॒वेदꣳ सर्वम्᳚ भू॒मिं॑  सर्वं॑ </div>
<div style="font-family: 'Noto Sans Devanagari From Early Access'" >पादो᳚ऽस्य  ए॒वेदꣳ सर्वम्᳚ भू॒मिं॑  सर्वं॑ </div>
<div style="font-family: 'Noto Sans Devanagari From Googleapis'">पादो᳚ऽस्य  ए॒वेदꣳ सर्वम्᳚ भू॒मिं॑  सर्वं॑ </div>
</body>
</html>
JelleBosmaMT commented 8 years ago

The latest Noto Sans Devanagari is designed to render the svarita's to the right of other top marks. I am led to believe this is the correct way. The earliest fonts did not care much about supporting Vedic and the svarita and anudatta marks were simply moved out of the way to prevent overlaps. If the top line is displayed with the font from 2014 and the others with fonts from 2012, that would explain the differences. The 2014 fonts contain the complete set of Vedic signs, the 2012 fonts do not.

nizarsq commented 4 years ago

@marekjez86 are urls mentioned above still maintained?

simoncozens commented 2 years ago

This was an issue related to the choice of glyphs in the subsetting performed by the Google Fonts API. It appears to now be fixed:

Screenshot 2022-04-22 at 14 22 50