Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-22-2021, 02:17 PM   #1
KamSingh
Junior Member
KamSingh began at the beginning.
 
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
KamSingh is offline   Reply With Quote
Old 04-22-2021, 02:29 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,722
Karma: 145864619
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.
JSWolf is offline   Reply With Quote
Advert
Old 04-22-2021, 02:35 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,046
Karma: 60358908
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;
}
Then you need to have a style (stylesheet entry is best)
Code:
span.bembo{
   font-family: "Bembo Std";
    
}
last each word/phrase needs to be wrapped in a span
Code:
<span class="bembo">the words</span>
OH
and your reading devise MUST support some form of 'Use Publishers Styles'

Last edited by theducks; 04-22-2021 at 02:50 PM. Reason: fixed span code
theducks is offline   Reply With Quote
Old 04-22-2021, 02:43 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Code:
span.bembo{
   font-family: "Bembo Std";
    
}
last each word/phrase needs to be wrapped in a span
Code:
span class="bembo"<the words</span>
OH
and your reading devise MUST support some form of 'Use Publishers Styles'
On my Kobo, I don't need publisher font for a case like this when reading ePub.

Oh and here is some of your code fixed.

Code:
span.bembo {
   font-family: "Bembo Std";
}
Code:
<span class="bembo">the words</span>
JSWolf is offline   Reply With Quote
Old 04-22-2021, 02:45 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,046
Karma: 60358908
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
theducks is offline   Reply With Quote
Advert
Old 04-22-2021, 02:47 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
@Jon
The code was snipped from a book that PASSED Calibres check
I know the first code I cleaned up was just for looks, but the span was incorrect. It should not have passed any validation.
JSWolf is offline   Reply With Quote
Old 04-22-2021, 02:50 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,046
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
I know the first code I cleaned up was just for looks, but the span was incorrect. It should not have passed any validation.
OOPs My span got messed up in the works (that was a hand coded example)
theducks is offline   Reply With Quote
Old 04-22-2021, 02:55 PM   #8
KamSingh
Junior Member
KamSingh began at the beginning.
 
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.
KamSingh is offline   Reply With Quote
Old 04-22-2021, 02:56 PM   #9
KamSingh
Junior Member
KamSingh began at the beginning.
 
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.
KamSingh is offline   Reply With Quote
Old 04-22-2021, 02:58 PM   #10
KamSingh
Junior Member
KamSingh began at the beginning.
 
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?
KamSingh is offline   Reply With Quote
Old 04-22-2021, 03:43 PM   #11
KamSingh
Junior Member
KamSingh began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2021
Device: Kindle
Also I'm reading on PC.
KamSingh is offline   Reply With Quote
Old 04-23-2021, 12:44 PM   #12
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,007
Karma: 105092227
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.
Quoth is offline   Reply With Quote
Old 04-23-2021, 01:49 PM   #13
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,725
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KamSingh View Post
<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>
If you own a Kindle model that supports AZW3 or KFX files, you don't have to embed any fonts since current Kindle models support all major Indic languages out of the box.
(The screenshot shows the KFX version of your HTML code without any embedded fonts.)
Attached Thumbnails
Click image for larger version

Name:	gurmukhi.png
Views:	139
Size:	16.4 KB
ID:	186753  
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacks Using a specific font per book Tzar Amazon Kindle 1 04-05-2020 01:09 PM
Wrong font for foreign letters Kujin Calibre 8 05-09-2019 01:23 PM
Kindle Previewer: error converting from epub with specific CSS and `display: none` arthurattwell Kindle Formats 3 08-10-2016 08:42 AM
Settings display in foreign language - possible cause conversion error? BruceBick Conversion 12 12-18-2011 04:06 AM
Can kindle 3 remember specific font sizes for books? redryder Amazon Kindle 3 05-01-2011 11:13 AM


All times are GMT -4. The time now is 06:21 PM.


MobileRead.com is a privately owned, operated and funded community.