[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype
Subject:    Re: [ft] devanagari fonts - shifting of pen position
From:       Govind <govind () mangotechno ! com>
Date:       2009-05-26 5:54:27
Message-ID: 4A1B83E6.8080503 () mangotechno ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Deepti Chunduru wrote:
>
> Hi,
>
> I am using freetype to render devanagari fonts.
>
> I need to calculate the shift in pen position using the formula :
>                 pointsize * resolution/(72*upem)                
>               where pointsize = FUnits * point
>
> This would help me in calculating the shift in pen position.
> How can i get  funits of a glyph for a font/character?
>
> Currently i use:
> pen_x += slot->advance.x >> 6
> But this shift gives a lot of gap between two glyphs
>
> Is there any other way to calculate correct shift to obtain correct 
> spacing?
>
>
> Thnx,
> Deepti
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
>
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Freetype mailing list
> Freetype@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/freetype
>   
Hi,
 you can calculate funits by looking into font file you are using.
FUnits =  (font's ascender- font's descender).
I hope, it might work for you.

Regards
Govind Choudhary

[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Deepti Chunduru wrote:
<blockquote
 cite="mid:OF8477B158.4D314F5A-ON652575C2.001D927B-652575C2.001EE4D5@tcs.com"
 type="cite"><br>
  <font face="sans-serif" size="2">Hi,</font>
  <br>
  <br>
  <font face="sans-serif" size="2">I am using freetype to render
devanagari
fonts.</font>
  <br>
  <br>
  <font face="sans-serif" size="2">I need to calculate the shift in pen
position using the formula :</font>
  <br>
  <font face="sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; pointsize * resolution/(72*upem) &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font>
  <br>
  <font face="sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; where pointsize = FUnits * point</font>
  <br>
  <br>
  <font face="sans-serif" size="2">This would help me in calculating
the
shift in pen position.</font>
  <br>
  <font face="sans-serif" size="2">How can i get &nbsp;funits of a glyph
for a font/character?</font>
  <br>
  <br>
  <font face="sans-serif" size="2">Currently i use:</font>
  <br>
  <font face="Courier New" size="2">pen_x += slot-&gt;advance.x
&gt;&gt;
6</font>
  <br>
  <font face="sans-serif" size="2">But this shift gives a lot of gap
between
two glyphs</font>
  <br>
  <br>
  <font face="sans-serif" size="2">Is there any other way to calculate
correct shift to obtain correct spacing?</font>
  <br>
  <br>
  <br>
  <font face="sans-serif" size="2">Thnx,</font>
  <br>
  <font face="sans-serif" size="2">Deepti</font>
  <br>
  <pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


  </pre>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Freetype mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Freetype@nongnu.org">Freetype@nongnu.org</a> <a \
class="moz-txt-link-freetext" \
href="http://lists.nongnu.org/mailman/listinfo/freetype">http://lists.nongnu.org/mailman/listinfo/freetype</a>
  </pre>
</blockquote>
Hi,<br>
&nbsp;you can calculate funits by looking into font file you are using.<br>
FUnits =&nbsp; (font's ascender- font's descender). <br>
I hope, it might work for you.<br>
<br>
Regards<br>
Govind Choudhary<br>
</body>
</html>



_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic