Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2024, 03:10 AM   #1
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Extra CSS @font-face losing font url

Hello,

In my Common Option --> Look and Feel --> Styling --> Extra CSS I'm using this block to add a font reference:

Code:
@font-face {
font-family: "Times New Roman"; 
font-weight: normal; 
font-style: normal; 
src: url(res: ///ebook/fonts/../../mnt/sdcard/fonts/Times-New-Roman.ttf);}

@font-face {
font-family: "Times New Roman"; 
font-weight: bold; 
font-style: normal; 
src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Times-New-Roman-Bold.ttf);}

@font-face {
font-family: "Times New Roman"; 
font-weight: normal;
font-style: italic; 
src:url(res:///ebook/fonts/../../mnt/sdcard/fonts/Times-New-Roman-Italic.ttf);}

@font-face {
font-family: "Times New Roman"; 
font-weight: bold; 
font-style: italic; 
src: url(res:///ebook/fonts/../../mnt/sdcard/fonts/Times-New-Roman-Bold-Italic.ttf);}
When I convert a file from epub to epub, one of the font-faces loses the "src: url" data.

The code looks like this:

Code:
@font-face {
font-family: "Times New Roman"; 
font-weight: normal; 
font-style: normal; }
I'm expecting to see this:

Code:
@font-face {
font-family: "Times New Roman"; 
font-weight: normal; 
font-style: normal; 
src: url(res: ///ebook/fonts/../../mnt/sdcard/fonts/Times-New-Roman.ttf);}
I'm not sure why my font-weight normal, font-style-normal @font-face is losing the url information on conversion?

I'd appreciate any and all help

Thanks,
Amalthia
Amalthia is offline   Reply With Quote
Old 02-10-2024, 03:37 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,996
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hard to say without a complete example.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-10-2024, 04:13 PM   #3
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by kovidgoyal View Post
Hard to say without a complete example.
Do you need the page_style.css file as an example or the file I'm converting as an example? From what I can tell this is happening with all epubs I convert.

I'll see if I can find a public domain ebook for an example if that's what you need.

Thanks,
Amalthia
Amalthia is offline   Reply With Quote
Old 02-10-2024, 04:44 PM   #4
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,553
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Are you saying the problem only occurs for the first font-face shown in the first post of this thread?

If so I did notice that there is an added space in the url that does not appear in the other font-face definitions.
jhowell is offline   Reply With Quote
Old 02-10-2024, 05:23 PM   #5
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by jhowell View Post
Are you saying the problem only occurs for the first font-face shown in the first post of this thread?

If so I did notice that there is an added space in the url that does not appear in the other font-face definitions.
Yes, the problem is only happening with the first font-face.

I'll remove the space and see if that helps.

Thanks!
Amalthia
Amalthia is offline   Reply With Quote
Advert
Old 02-10-2024, 06:04 PM   #6
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Removing the extra space made a difference! It's now fixed. Thanks for catching that!
Amalthia is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
@font-face is not embedded iliakan Conversion 2 01-12-2015 02:29 AM
Font from extra-css is not looked-up correctly iliakan Conversion 1 01-11-2015 07:59 AM
can't reduce font size of headline using extra css scissors Recipes 5 12-23-2013 03:45 AM
add 2 different font paths in Extra CSS raykoko Calibre 2 08-17-2013 04:47 AM
Am I using @font-face correctly? phossler Sigil 12 11-30-2012 04:38 PM


All times are GMT -4. The time now is 02:35 AM.


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