Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2014, 05:43 PM   #31
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Tex2002ans View Post

Quote:
Originally Posted by Jellby
You can still create SVG images. Convert the fonts into paths (inkscape can do that) and won't need to care about font embedding or licensing.
GrannyGrump posted a tutorial to show how to do this here:

https://www.mobileread.com/forums/sho...d.php?t=233131
Hi Tex;

I think you're a bit confused; the Granny's tutorial is for tracing bitmaps with Inkscape but what Jellby want to say is to convert text into "path". This kind of text is different from "traced text". Of course, you can use "traced text" but using text converted into path is by far easiest, clean and to offer better results.

Last edited by RbnJrg; 04-08-2014 at 05:45 PM.
RbnJrg is online now   Reply With Quote
Old 04-08-2014, 06:20 PM   #32
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by RbnJrg View Post
I think you're a bit confused; the Granny's tutorial is for tracing bitmaps with Inkscape but what Jellby want to say is to convert text into "path". This kind of text is different from "traced text". Of course, you can use "traced text" but using text converted into path is by far easiest, clean and to offer better results.
You are correct. Now after I reread the post, I see what was meant!

Perhaps we should get a tutorial of Font -> SVG Paths up as well!
Tex2002ans is offline   Reply With Quote
Advert
Old 04-08-2014, 08:57 PM   #33
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by RbnJrg View Post
No, no, no... You don't understand me. I don't mean a svg image based on a traced bitmap, but TEXT INSIDE A SVG WRAPPER. It's text, but its behaviours is like an image (with the advantage of a svg image). It's very light (because is only text but with the format you want). If I have a bit of time, I will post an example so all of you will be able to understand better what I want to say.

EDIT: This is what I want to say. Open the epub below in ADE; you will see something like:

Attachment 121409

Try to change the ADE font size; what happens? Nothing (because the title page is an image). And now try to change the size of the ADE windows; what happens? The title page adapts to its new windows size As you can see, you have the advantage of working with text and the advantage of working with images, all in one thing. And with only 4.2Kb (the whole epub).

Of course, I'm working with a "viewBox" for the svg wrapper of 800x600; you can change that as you wish. But in that case, you'll have to set new values for the "x" and "y" variables to position the text.
hi Rubén

Wonderful! I have been plagued for setting up title pages for years within my EPUBs and then here is a perfect -and easily adaptable- solution. Thank you very much.

Now I just have to learn quickly how to use Inkscape to add the logos...

Last edited by roger64; 04-08-2014 at 09:35 PM.
roger64 is offline   Reply With Quote
Old 04-08-2014, 10:05 PM   #34
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by roger64 View Post
hi Rubén

Wonderful! I have been plagued for setting up title pages for years within my EPUBs and then here is a perfect -and easily adaptable- solution. Thank you very much.
You are welcome, Roger

Quote:
Now I just have to learn quickly how to use Inkscape to add the logos...
It's not difficult. Read this thread:

https://www.mobileread.com/forums/sho...d.php?t=233131

and insert the svg image created with Inkscape inside the svg wrapper; see my epub to watch how I inserted the "Loupe" logo; it's a piece of cake
RbnJrg is online now   Reply With Quote
Old 04-09-2014, 02:05 AM   #35
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Right, so I'll save my titlepages as png and see how that improves the quality. I use libreoffice draw by the way, to make my titlepages. Very easy to use for a simple soul like me.

As for my previous question: is it okay to use a <div> for the subtitles - as opposed to using a <span> with block?
JLius is offline   Reply With Quote
Advert
Old 04-09-2014, 03:33 AM   #36
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by RbnJrg View Post
it's a piece of cake
Indeed. Of course, grannies know a lot about preparing cakes!
roger64 is offline   Reply With Quote
Old 04-09-2014, 03:42 AM   #37
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,548
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
You can clearly see the JPG Haloing which occurs around the text/lines:

Attachment 121434
Especially noticeably if you tilt an LCD screen...

Quote:
Here is the same image saved as PNG:

Attachment 121435

As you can see, there is actually only Black + White, and NOTHING else. Zero loss/deterioration from the original.
and, of course, PNG does not need to be only black and white, it could also have some grey levels to mitigate aliasing. The point is, with PNG you can get exactly what you want, and not what the compression algorithm gives, emphatically not those blocky artifacts.

Quote:
Originally Posted by JLius View Post
Right, so I'll save my titlepages as png and see how that improves the quality. I use libreoffice draw by the way, to make my titlepages. Very easy to use for a simple soul like me.
As long as you do not open a JPG and save it as PNG...

Quote:
As for my previous question: is it okay to use a <div> for the subtitles - as opposed to using a <span> with block?
Roughly yes, and I said it was, but let me now change my mind. I believe the XHTML specification does not allow some elements (including <p> and <h*>) to contain other block elements. Since <div> is a block element, it cannot be contained in <h1>, but a <span> (or any other inline element) with "display:block" is fine.
Jellby is offline   Reply With Quote
Old 04-09-2014, 05:56 AM   #38
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
I applied the svg wrapper to the title page. Display with Calibre, Sigil, Prince was perfect. ADE 1.7.3 had trouble with it (the logo was on the top left, titles were pushed to the right...). I suppose this "old generation" viewer does not cope with it, does it happen too with recent versions of ADE?
roger64 is offline   Reply With Quote
Old 04-09-2014, 07:10 AM   #39
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by roger64 View Post
I applied the svg wrapper to the title page. Display with Calibre, Sigil, Prince was perfect. ADE 1.7.3 had trouble with it (the logo was on the top left, titles were pushed to the right...). I suppose this "old generation" viewer does not cope with it, does it happen too with recent versions of ADE?
In my post:

https://www.mobileread.com/forums/sho...2&postcount=21

I attach a screenshot of my ADE 2.0.67532:



As you can see, it looks well. So I guess that your issue is due to your old version of ADE.

Regards
Rubén
RbnJrg is online now   Reply With Quote
Old 04-09-2014, 08:41 AM   #40
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thank you. So, it's also OK with 2.0.

I often produce one 9x12 PDF and another IPAD size. One advantage is the fact that the SVG title page fits perfectly for the two sizes. Before I had to calculate percentages of padding-top and made mistakes for one or another size. This is really very convenient for handling the two, three or four pages before the main text.
roger64 is offline   Reply With Quote
Old 04-09-2014, 11:45 AM   #41
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Sorry, guess I'm just clumsy...

So I exported my titlepage as a png, but not it just won't fit the screen when I import it in my epub.

Export setting (default): W:992 H:1.403 pixels.
In my epub (I kept the same values I used for the jpg):

Code:
 <title>Titelblad</title>
  <style type="text/css" title="override_css">
  @page {
    padding: 0;
    margin: 0;
    }
  body {
    text-align: center;
    padding: 0;
    margin: 0;
  }
  </style>
</head>

<body>

  <div>

    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 838 1186" preserveAspectRatio="none">
      <image width="992" height="1403" xlink:href="Titelblad.png"/>
    </svg>

  </div>

</body>
I already tried exporting it with W:600 H800 and setting it also to 600/800 in the svg, but that looked also awfull.

If you are wondering were I got the W992 H1403 (and all the other stuff before that): it was the default setting calibre used for the cover, so I thought I'd go with that.
JLius is offline   Reply With Quote
Old 04-09-2014, 01:59 PM   #42
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JLius View Post
Sorry, guess I'm just clumsy...

So I exported my titlepage as a png, but not it just won't fit the screen when I import it in my epub.

Export setting (default): W:992 H:1.403 pixels.
In my epub (I kept the same values I used for the jpg):

Code:
 <title>Titelblad</title>
  <style type="text/css" title="override_css">
  @page {
    padding: 0;
    margin: 0;
    }
  body {
    text-align: center;
    padding: 0;
    margin: 0;
  }
  </style>
</head>

<body>

  <div>

    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 838 1186" preserveAspectRatio="none">
      <image width="992" height="1403" xlink:href="Titelblad.png"/>
    </svg>

  </div>

</body>
I already tried exporting it with W:600 H800 and setting it also to 600/800 in the svg, but that looked also awfull.

If you are wondering were I got the W992 H1403 (and all the other stuff before that): it was the default setting calibre used for the cover, so I thought I'd go with that.
I think you mixed two concepts If you are going to use a .png image as title page, then is not neccesary to enclosed in a svg wrapper. In my post I used a svg wrapper because I didn't want to use a .png image, just text. But now that you are going to use a image, just write in your .xhtml file:

Code:
 <title>Titelblad</title>
  <style type="text/css" title="override_css">
  @page {
    padding: 0;
    margin: 0;
    }
  body {
    text-align: center;
    padding: 0;
    margin: 0;
  }
  </style>
</head>

<body>

  <p><img alt="" height="100%" src="Titelblad.png"/></p>

</body>
However, take in count that you are not using a 3:4 image, so is probable (depend on the device reader) that the title page doesn't fit perfectly. And check that the image path is correct.

Last edited by RbnJrg; 04-10-2014 at 03:38 PM.
RbnJrg is online now   Reply With Quote
Old 04-10-2014, 01:51 AM   #43
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
If the titlepage.png is a single page and should fill out the screen (with keeping the aspect ratio of course), putting it in a SVG wrapper is still the best choice.
I use:
Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 800" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="800" width="600" xlink:href="../Images/titlepage.png"></image>
    </svg>
  </div>
Notice the preserveAspectRatio difference. This will keep the aspect ratio and not distort the image. Change the red values to the actual dimension of your image.
If you do not use folders in your ePUB, you must omit '../Images/' from the code.
Toxaris is offline   Reply With Quote
Old 04-10-2014, 02:02 AM   #44
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
Thank you Toxaris, I'll try that this evening.
Is it best to save my png as 800/600, or should I just leave it at 992/1403?
JLius is offline   Reply With Quote
Old 04-10-2014, 04:51 AM   #45
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
You can leave it. If you are going to resize, ensure that your ratio stays intact. The 800x600 is just an example.
Toxaris is offline   Reply With Quote
Reply

Tags
css, epub, font-size, headings


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
Determine font and font size on incoming epub? peaceridge Calibre 4 01-30-2012 03:35 PM
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM
Different font for headings bremler ePub 4 03-11-2010 06:03 AM


All times are GMT -4. The time now is 07:49 AM.


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