View Single Post
Old 08-23-2020, 06:08 AM   #1
simurq
Member
simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.simurq ought to be getting tired of karma fortunes by now.
 
Posts: 20
Karma: 1000010
Join Date: Jul 2015
Device: Kindle Paperwhite v1
Question An issue with Arabic script in Kindle Paperwhite

I'm using the 5th generation (B024) PW, which is a KF8-compatible device, as far as I'm aware, with the latest firmware update v5.6.1.1. I created an EPUB3 book with Russian text and some portions of the content in Arabic put inside span tags, as shown in the markup and CSS code below, and converted it to AZW3 using Calibre v4.23 (also the latest version as of today):

Quote:
/* html brackets for spans <> changed to square brackets [] by me to make the content visible on the forum page */

...появляются легендарные <i>йаджудж</i> и <i>маджудж</i> ([span class="arabic" dir="rtl" lang="ar" xml:lang="ar"]يأجوج و مأجوج[/span] - <i>Прим. сост.</i>).
Code:
span.arabic {
  font-size: 1.2em;
  font-family: Amiri;
}
The language of the book is declared as follows:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="ru" xml:lang="ru">
The only media query used in the book is:

Code:
@media screen and (min-width: 1024px) {
  body {
    width: 1024px;
    margin: auto;
  }
}
The fonts used are well-recognized in the community (PT Sans/Serif for Russian and Amiri for Arabic) and have been embedded in the stylesheet and declared in 'content.opf' using Calibre Editor v4.23:

Spoiler:

Code:
@font-face {
  src: url(../Fonts/Amiri-Bold.ttf);
  font-family: "Amiri";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/Amiri-BoldSlanted.ttf);
  font-family: "Amiri";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/Amiri-Regular.ttf);
  font-family: "Amiri";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/Amiri-Slanted.ttf);
  font-family: "Amiri";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTC55F.ttf);
  font-family: "PT Sans Caption";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTC75F.ttf);
  font-family: "PT Sans Caption";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTF55E.ttf);
  font-family: "PT Serif Expert";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTF55F.ttf);
  font-family: "PT Serif";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTF56F.ttf);
  font-family: "PT Serif";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTF75F.ttf);
  font-family: "PT Serif";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTF76F.ttf);
  font-family: "PT Serif";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTS55E.ttf);
  font-family: "PT Sans Expert";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTS55F.ttf);
  font-family: "PT Sans";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTS56F.ttf);
  font-family: "PT Sans";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTS75F.ttf);
  font-family: "PT Sans";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTS76F.ttf);
  font-family: "PT Sans";
  font-weight: bold;
  font-style: italic;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTZ55F.ttf);
  font-family: "PT Serif Caption";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
}
@font-face {
  src: url(../Fonts/PTZ56F.ttf);
  font-family: "PT Serif Caption";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
}


Now, when I open the book in Kindle AND select 'Publisher Font' from the device's menu, I can see a series of unconnected Arabic letters with no meaning at all (click on image below to see the same content in Kindle). I don't have the same issue with the default Kindle font setting though. Nor do I have a problem when viewing the files (EPUB3/AZW3) in Chrome or Calibre Viewer.


So, can you please advise what's wrong or a remedy to make Kindle show the Arabic script properly? Thank you!

Rustam Alhas
simurq is offline   Reply With Quote