![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 1350
Join Date: Jul 2012
Location: India
Device: none
|
media-type
hello all
does any one know the media type of .ttf font file ,i had searched and found 2 such media types, but when i had validated it found as in-valid thoose media types are 1. application/x-truetype-font 2. application/octet-stream and i am working on mac, any help would be regarded thank you |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 1350
Join Date: Jul 2012
Location: India
Device: none
|
errors
my css file is
@charset "UTF-8"; @namespace "http://www.w3.org/1999/xhtml"; @namespace epub "http://www.idpf.org/2007/ops"; @font-face{ font-family: 'QuicksandLight'; src: url('../fonts/FeENit2.ttf') format('truetype'); font-size:1.5em; } body { font-family: 'QuicksandLight', Gothic, Helvetica, Arial; background-color: rgb(240,240,240); font-size: 1.5em; line-height: 1.8em; } @font-face { font-family:'QuicksandLight'; src: url('../fonts/FeENrm2.ttf'); font-style:italic; font-size:20px; } h3 { font-style:italic; font-weight:normal; } } .preamble::first-line { font-size:2em; font-style:normal; } h2 { font-style:italic; font-weight:normal; } .we-the-people { color:#900; font-style:italic; font-weight:normal; } #signing { width:58%; margin:0.5em auto 1em auto; box-shadow:8px 8px 8px gray; } my package.opf is as follows <manifest> <item id="font1" href="fonts/FeENrm2.ttf" media-type="application/x-font-ttf"/> <item id="font2" href="fonts/FeENit2.ttf" media-type="application/x-font-ttf"/> but when validated i found 2 errors ERROR: /Users/lrim3/Desktop/fazeela's projects/i did/epub3 font formatting-i did/epub2.epub/EPUB/css/style1.css: Font-face reference EPUB/fonts/FeENit2.ttfto non-standard font type application/x-font-ttf ERROR: /Users/lrim3/Desktop/fazeela's projects/i did/epub3 font formatting-i did/epub2.epub/EPUB/css/style1.css: Font-face reference EPUB/fonts/FeENrm2.ttfto non-standard font type application/x-font-ttf thank you me too.... |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
There are various examples here on the site about font embedding with the correct syntax.
Remember, the @font-face must be the first lines in a stylesheet. The @namespace and @charset are not used. You place that in the xml declaration of the xhtml files. |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 1350
Join Date: Jul 2012
Location: India
Device: none
|
thank you
i had searched with in the forum , i find the answer by replacing the media type as "application/vnd.ms-opentype"
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Don't forget my other comments. In general a font is not embedded for the body, since font embedding does not always works and a full font can be quite large.
For certain languages there is no choice though. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,986
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Truetype: .ttf = media-type="application/x-font-ttf"
Opentype: .otf = media-type="application/vnd.ms-opentype" |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Permissable Spine Media Type Error | mimosawind | ePub | 5 | 10-07-2011 03:55 AM |
digital media and printed media are the same... | mattbiernat | Amazon Kindle | 0 | 08-13-2010 07:55 PM |
iPad More People Recognizing That Media iPad Adaptations Feel Like CD-ROM Media | kjk | Apple Devices | 1 | 06-14-2010 06:26 PM |
Display File Type and Sort by Type | pragmortal | Calibre | 7 | 09-21-2009 08:07 PM |
Cooper blog: News media is lost about digital media, too | Steven Lyle Jordan | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 11-05-2007 10:06 AM |