![]() |
#1 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 37
Karma: 300000
Join Date: Mar 2014
Device: Nook
|
![]()
I get it that there are only 2 fonts for the epub unless you add your own.
I get it that a style sheet is needed for each new font used. I don't get... How does anyone code the new font into the document? Does the ENTIRE DOCUMENT need to be in CSS? I want to show the text within a box as monospaced font. My CSS file: @font-face{ font-family: 'texgyrecursor'; font-weight: normal; font-style: normal; scr:url('../Fonts/texgyrecursor.otf'); } [The file is texgyrecursor.otf but the name displays as TeXGyreCursor in OpenOffice. That might be ONE problem. For now it make no difference.] Here is the code for the page (skipping a lot of words within the box). Quote:
![]() |
|
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
you must apply the css style to a specific tag, for instance:
Code:
<style> body { font-family:'texgyrecursor'; font-style:normal; } </style> |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,020
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
make that body tbody if you only want it to be used inside the table.
Calibre has a note that the font-family name should match what is coded Internaly in the font for best compatibility. font-family: "TeXGyreCursor" |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Some reader, I believe also the Nook, will ignore font settings in the body tag.
|
![]() |
![]() |
![]() |
#5 | |||
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 37
Karma: 300000
Join Date: Mar 2014
Device: Nook
|
So far things are still crazy
Yes, tbody modifications are ignored in Sigil.
SIGIL does show a modification in the text when I put the code around body. The text changes, and I save it. I open the work in Nook and Cool Reader. Both show the default font. New Times Roman. According to a checker within SIGIL Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No need. The message is correct, the stylesheet is of no use if you don't actually use it...
Remove this: Code:
<style type="text/css"> body { font-family:'TeXGyreCursor'; font-style:normal; } </style> Code:
@font-face{ font-family: 'TeXGyreCursor'; font-weight: normal; font-style: normal; scr:url('../Fonts/texgyrecursor.otf'); } td.data{ font-family: 'TeXGyreCursor'; vertical-align:top; } Since not Sigil but Nook will ignore font settings to the body. So, use for example this in your file: Code:
<td class="data">OLIGODENDROGLIA<br /> TACHYARRHYTHMIA<br /> ... <br /></td> |
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 37
Karma: 300000
Join Date: Mar 2014
Device: Nook
|
I am linking...
HTML is linked to the stylesheet and the fonts are loaded. I still get the error.
Stylesheet is as suggested. The preview on the right is showing what I want. ![]() ![]() Image violates posting guidelines for size - MODERATOR] Last edited by Dr. Drib; 05-17-2014 at 07:15 AM. |
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,020
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
(partial covered in image)
Lines 1 and 2 are a possible clue There are 2 fonts embedded? (fonts folder) But they appear to be unused (or coded wrong in the CSS @fonts) 1) filename case must be an exact match 2) Sigil fonts are always coded starting with "../Fonts/ 3) All font-family references to that font must match the @font: Family Name, font-weight, font-style values (you may need up to 4 Fonts (@fonts) to support the combinations of bold and italic in use |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,548
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Almost all devices/apps have a monospaced font available. There's really no need to embed one. Just use font family: "monospaced" and call it a day.
Also... the Nook now defaults to ignoring embedded fonts. Users have to turn on Publisher Defaults in order to see the fonts you include. And since there's no way to force users to do that, I frankly wouldn't bother. Last edited by DiapDealer; 03-03-2014 at 12:42 PM. |
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 37
Karma: 300000
Join Date: Mar 2014
Device: Nook
|
THAT WORKS!
Wonderful. I had no idea that there was a monospace font in the Nook.
Yes. I used: font-family: monospace; And that works. ![]() I will also take the other suggestion and "call it a day." Blessings to all. I shall soon have a big tomb, to add to the pile of the puzzle makers niche market. (A dictionary to help crossword makers if you haven't guessed. Did anyone notice the words are in backward alphabetic order and all the same size?) |
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Well, the title is about 16 letter words, so that was a hint. I didn't look at the actual words themselves, as they were not part of the problem.
|
![]() |
![]() |
![]() |
#12 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
![]() Albert |
|
![]() |
![]() |
![]() |
#13 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,020
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:
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mini advanced font settings ignored in one book - embedded font? | lordofazeroth | Kobo Reader | 4 | 09-20-2013 02:15 PM |
Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |
Font help for newbie? (902) | bueymo | PocketBook | 11 | 04-19-2011 09:29 PM |
ttc font file can't be put into font folder | droople | Sigil | 2 | 08-21-2010 10:05 AM |
feed to lrf, how do I change font (or have default font) | lovemov | Calibre | 3 | 03-16-2009 10:57 PM |