|
|
#1 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
|
How to display specific foreign font?
Hi Guys,
I'm trying to view a file with two languages, English and Gurmukhi. I've managed to change the English part easy enough but the problem I'm having is that I seem unable to change the font being used for the Gurmukhi. I have tried to edit the book and change the embedded font but it seems to default to the same font. Is there a way I can easily choose the font for the Gurmukhi text. Any help much appreciated. Thanks, Kam |
|
|
|
|
|
#2 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 81,045
Karma: 150250725
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You;ll have to post the code used in the CSS and HTML for the Gurmukhi font.
|
|
|
|
|
|
#3 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,326
Karma: 62025226
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Embedding a font is more than just adding a Font file
That is step 1 Then you need the appropriate @fontface to link it to a font family eg. Code:
@font-face {
font-family: "Bembo Std";
src: url(../Fonts/BemboStd.otf);
font-style: normal;
font-weight: normal;
}
Code:
span.bembo{
font-family: "Bembo Std";
}
Code:
<span class="bembo">the words</span> and your reading devise MUST support some form of 'Use Publishers Styles' Last edited by theducks; 04-22-2021 at 03:50 PM. Reason: fixed span code |
|
|
|
|
|
#4 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 81,045
Karma: 150250725
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Oh and here is some of your code fixed. Code:
span.bembo {
font-family: "Bembo Std";
}
Code:
<span class="bembo">the words</span> |
|
|
|
|
|
|
#5 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,326
Karma: 62025226
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
@Jon
The code was snipped from a book that PASSED Calibres check |
|
|
|
|
|
#6 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 81,045
Karma: 150250725
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#7 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,326
Karma: 62025226
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
|
|
|
|
#8 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
|
<p class="calibre1">Page 1 </p>
<p class="calibre1 gurmukhi">ੴ ਸਿਤ ਨਾਮੁ ਕਰਤਾ ਪੁਰਖੁ ਿਨਰਭਉ ਿਨਰਵੈਰੁ ਅਕਾਲ ਮੂਰਿਤ ਅਜੂਨੀ ਸੈਭੰ ਗੁਰ ਪਰ੍ਸਾਿਦ ॥ </p> <p class="calibre1">ik-oNkaar sat naam kartaa purakh nirbha-o nirvair akaal moorat ajoonee saibhaN gur </p> <p class="calibre1">parsaad. </p> Here is some of the html. |
|
|
|
|
|
#9 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
|
Also how do I make the background image fullscreen, it is being displayed with the margins I set for the text.
|
|
|
|
|
|
#10 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
|
I'm using the default CSS style that is stickied, is it this that I modify?
|
|
|
|
|
|
#11 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
|
Also I'm reading on PC.
|
|
|
|
|
|
#12 |
|
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15,173
Karma: 111120239
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Don't use background images.
Makes it very hard for some people to read at all. Support is varied. |
|
|
|
|
|
#13 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763
Karma: 24088559
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(The screenshot shows the KFX version of your HTML code without any embedded fonts.) |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hacks Using a specific font per book | Tzar | Amazon Kindle | 1 | 04-05-2020 02:09 PM |
| Wrong font for foreign letters | Kujin | Calibre | 8 | 05-09-2019 02:23 PM |
| Kindle Previewer: error converting from epub with specific CSS and `display: none` | arthurattwell | Kindle Formats | 3 | 08-10-2016 09:42 AM |
| Settings display in foreign language - possible cause conversion error? | BruceBick | Conversion | 12 | 12-18-2011 05:06 AM |
| Can kindle 3 remember specific font sizes for books? | redryder | Amazon Kindle | 3 | 05-01-2011 12:13 PM |