Re: generating fonts for links

Karel Kulhavý <[email protected]>
Newsgroups gmane.comp.web.links.list
Message-ID <[email protected]>
On Mon, Feb 24, 2003 at 01:10:36PM +0700, The Thanh Han wrote:
> Hi,
> 
> sorry to bother again. I was trying to understand how it works by reading
> the sources:
> 
> for each letter, a PS page of A4 size is generated. The letter is drawn
> at 392.9619pt, with the staring point at (100,300) from the left-bottom
> corner. Two rectangles are drawn at (100,0)x(X,120) and (100,722)x(X,842),
> where X is the width of the letter being drawn. the PS page is converted to
> bitmap, and cropped to the region limited by those two above rectangles.
> the clip program is used to detract some space from the top and bottom.
> 
> >From the ps file, it looks that the baseline (300 - 120 = 180) is not 5/24
> of the image height (722 - 120 = 602). It seems that the clip program
> detracts further space from the bitmap, to make the baseline = 5/24 the
> image height. Why is it needed? Isn't it simpler to set the baseline to the
> exact value while creating the ps page? 

No. There is no reason why it's this way. It just developed this way. The ps
page is not a final product.

> 
> It looks like clip.c detracts the top and bottom space based on the value
> of hundred_dpi, top_promile and bot_promile. How those are calculated?
> 
> You told me that the result images should have height=112. I looked at the
> images coming with links, and it looks that some fonts have height=112, and
> some have height=120. When one should use 120 and when 112?

It doesn't matter what height you use. Small wil have jagged outlines
and big will take up too much space.

Cl<
_______________________________________________
Links-list mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/links-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.