Jinntec / Fore

Fore - declarative user interfaces in plain HTML
MIT License
82 stars 11 forks source link

Character encoding/display issue in Chrome #153

Closed timathom closed 1 year ago

timathom commented 2 years ago

Discussed in #152.

I have text in Russian that has been transliterated and contains diacritics. Using this instance data (inline or loaded from file):

<catalog yes="true" no="false" maybe="false" confidence="0" bib="811932">
  <a href="https://search.library.yale.edu/catalog/811932" target="_blank">Semʹi︠a︡ Ulʹi︠a︡novykh : tetralogii︠a︡ ; Ocherki i statʹi o Lenine : 1935-1981 / Mariėtta Shagini︠a︡n.</a>
</catalog>

And this form:

<fx-fore>
  <fx-model>
    <!-- Instance data -->
    <fx-instance src="catalog.xml"></fx-instance>
    <!-- /Instance data -->
  </fx-model>
  <fx-repeat id="repeat-catalog" ref=".">
    <template>
      <div class="row">
        <div class="catalog-entry col">
          <a href="{a/@href}" target="_blank">
            <fx-output value="a"></fx-output>
          </a>         
        </div>
      </div>
    </template>
  </fx-repeat>
  <fx-inspector open="true"></fx-inspector>
</fx-fore>

The diacritics display correctly in Firefox, but not in Chrome.

JoernT commented 1 year ago

So clearly it has to deal with Chromes' usage of fonts and it not related with Fore.

Setting an compatible font explicitly fixes the issue in Chrome and Safari like is shown in the file 'demo/diacritics.html'.

A related google fonts issue.

Affected by this issue:

Firefox is working properly.

This issue is beyond the scope of Fore but special precaution obviously is necessary when dealing with diacritics.