Go Premium for a chance to win a PS4. Enter to Win

x

Fonts Typography

16K

Solutions

19K

Contributors

A font is a particular size, weight and style of a typeface. Each font is a matched set of type, one piece (called a "sort") for each glyph, and a typeface consists of a range of fonts that share an overall design. With the advent of digital typography, font is frequently synonymous with typeface, although the two terms do not necessarily mean the same thing. In particular, the use of "vector" or "outline" fonts means that different sizes of a typeface can be dynamically generated from one design. Each style may still be in a separate "font file" -- for instance, the typeface "Futura" may include the fonts "Futura roman", "Futura italic", "Futura bold" and "Futura extended" —- but the term "font" might be applied either to one of these alone or to the whole typeface.

Share tech news, updates, or what's on your mind.

Sign up to Post

I've been using phantomjs to convert HTML pages to PDF.  On my Mac, everything was OK.  But, on a Linux environment, the fonts were not rendering properly (particularly web fonts).  There isn't too much out there on this problem, until I finally stumbled upon this github issue: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/45.  (Apparently, the workaround found for wkhtmltopdf also applies to phantomjs).  Anyways, the fix finally ended up to be creating a new file (/etc/fonts/conf.d/100-smoothfonts.conf) with the following contents:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
</fontconfig>

Open in new window


Just throwing this out there in case someone else has the same issue and stumbles upon this post!
6
 
LVL 15

Author Comment

by:Phil Phillips
Yeah, I'm using the screen capture ability of phantomjs.  Supported output formats are png, jpeg, gif, pdf.  The phantomjs download page has binaries for the major OSes. Their git repo has a script called "rasterize.js" that I've been using to do the capturing.  Sample usage:

phantomjs rasterize.js https://www.experts-exchange.com ee.jpg

Open in new window

1
 
LVL 7

Expert Comment

by:Brian Matis
Sweet, thanks Phil! I'll have to give that a try.
0
Hire Technology Freelancers with Gigs
LVL 11
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

how to find the hanging space in the n number of bullet text i.e. show the space in between text and bullet for each paragraph and also find the font size in the bullet text in power point all slide using VBA.  Any help me that it is very useful in my environment?
0
 
LVL 12

Administrative Comment

by:Andrew Leniart
Hi Satishkumar,

Welcome to Experts Exchange.

What you have done is made a "Post" here.  To get expert help, you need to "Ask a Question" so that more experts are able to see that you need help. Click the Big blue button near the top of your screen.

Ask a Question

The following link also explains more about asking for help at Experts Exchange..
http://support.experts-exchange.com/customer/portal/articles/336330

Hope that's helpful.

Regards,
Andrew
EE Topic Advisor
0

Fonts Typography

16K

Solutions

19K

Contributors

A font is a particular size, weight and style of a typeface. Each font is a matched set of type, one piece (called a "sort") for each glyph, and a typeface consists of a range of fonts that share an overall design. With the advent of digital typography, font is frequently synonymous with typeface, although the two terms do not necessarily mean the same thing. In particular, the use of "vector" or "outline" fonts means that different sizes of a typeface can be dynamically generated from one design. Each style may still be in a separate "font file" -- for instance, the typeface "Futura" may include the fonts "Futura roman", "Futura italic", "Futura bold" and "Futura extended" —- but the term "font" might be applied either to one of these alone or to the whole typeface.