Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 06-29-2008, 09:09 PM   #1
caritas
Enthusiast
caritas doesn't littercaritas doesn't litter
 
Posts: 26
Karma: 161
Join Date: Feb 2008
Device: Sony PRS505
Subtitute font when rending PDF on small screen

The effect of PDF rending on small screen device (like sony ereader) is not good now. One reason is that the font used in PDF is designed for printing (> 300 dpi) not for low-resolution small screen (166dpi for ereader).

Considering desktop PC font rending, ordinary resolution of desktop PC is 72dpi or 96dpi, but even the small font of menu is quite readable. And the effect of PDF rending on PC is worse than menu for same font size. One reason is that the menu font is designed for low-resolution.

So if the font in PDF is substituted with font for low-resolution, the rending effect will be better. Fortunately, the font substitution function is available in libpoppler (and xpdf), but it is not configurable now. As an experiment, I substitute Times by "Bitstream Vera Sans" through hard-coding that in libpopper/poppler/GfxFont.cc.

The rending effect is attached.

1. chap6.pdf is the example PDF.
2. org.png is rended with original PDF font (Times).
3. nf.png is rended with "Bitstream Vera Sans".
4. pl.png is rended with pdf2lrf

The patch is attached too as ttf.patch

Known issues:

- "fi" is not displayed correctly with replaced font because of font encoding. This can be resolved by modifying the font with tools such as "fontforge".
Attached Thumbnails
Click image for larger version

Name:	org.png
Views:	737
Size:	31.4 KB
ID:	13940   Click image for larger version

Name:	nf.png
Views:	753
Size:	31.6 KB
ID:	13941   Click image for larger version

Name:	pl.png
Views:	722
Size:	37.7 KB
ID:	13942  
Attached Files
File Type: pdf chap6.pdf (267.9 KB, 730 views)
File Type: gz ttf.patch.gz (286 Bytes, 637 views)

Last edited by caritas; 06-30-2008 at 07:38 AM.
caritas is offline   Reply With Quote
Old 06-29-2008, 10:32 PM   #2
RWood
Technogeezer
RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.RWood ought to be getting tired of karma fortunes by now.
 
RWood's Avatar
 
Posts: 7,233
Karma: 1601464
Join Date: Nov 2006
Location: Virginia, USA
Device: Sony PRS-500
For low resolution devices I have found the best font is Nomad. That said, I do not like the font and avoid using it when I can.
RWood is offline   Reply With Quote
Advert
Old 06-30-2008, 07:41 AM   #3
caritas
Enthusiast
caritas doesn't littercaritas doesn't litter
 
Posts: 26
Karma: 161
Join Date: Feb 2008
Device: Sony PRS505
The patch is not needed, because fontconfig is used by libpoppler, font substitution can be done via fontconfig. Put the fonts.conf attached in your home directory via .fonts.conf (Linux), the Times font will be replaced by "Calibri" font.
Attached Files
File Type: gz fonts.conf.gz (870 Bytes, 643 views)
caritas is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-300 Med font size too big, but small font size too small eli2k Sony Reader 4 05-28-2010 09:47 AM
Font of pdf-type pages too small! hopefulist Amazon Kindle 1 12-25-2009 04:58 PM
Font to Small CChamp Amazon Kindle 1 02-24-2009 08:16 AM
Another embold method for rending PDF caritas PDF 0 07-01-2008 09:42 AM
Subtitute font when rending PDF in small screen caritas Sony Reader 0 06-28-2008 08:09 AM


All times are GMT -4. The time now is 03:58 PM.


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