|
From: | Balraj Balakrishnan, Integra-PDY, IN |
Subject: | Re: [ft] FW: Getting the charcode Value when the Glyph ID is known |
Date: | Mon, 2 May 2011 09:19:37 +0000 |
Dear Suzuki, As am new to freetype and all these font stuffs, I couldn’t rather frame my requirement in a right manner. I shall be making an another attempt to bring about much more clarity in what I really want from freetype:
1.
The scenario here is, we are trying to convert the source PDF into an HTML, while doing this there are many fonts in the PDF which are extracted or mapped to a wrong character. So we are extracting the font files from the PDF, to convert
glyph's (Symbols, Unicode) in the font file as an image and replace the wrongly extracted characters/Symbols/Unicode in the HTML file with the image.
In the above mentioned scenario the image should maintain its position in the outline in order place it in an HTML file. If you look at the image below the fonts Quote right and the Comma is differentiated
based on its position in a given line. So what I am trying to achieve is to extract an image with its rectangular boundary intact, it shouldn’t be cropped for white spaces as shown below:
2.
>Can you help me with other alternatives which are there to iterate all the glyphs present in the font file irrespective of the cmap table. You can get the maximum glyph index from FT_Face->num_glyphs. Scanning like for ( gid = 0; gid < face->num_glyphs; gid ++ ) { How to get the character code for a particular gid if available? } Be Well, Amith Sai -----Original Message----- On Fri, 29 Apr 2011 12:01:54 +0000 "Balraj Balakrishnan, Integra-PDY, IN" <address@hidden> wrote: >How can I achieve the glyph image with its proper positioning, in order >to tackle this scenario? Sorry, I could not understand it from your message, what is your scenario? You want to do something like OCR? >Can you help me with other alternatives which are there to iterate all >the glyphs present in the font file irrespective of the cmap table. You can get the maximum glyph index from FT_Face->num_glyphs. Scanning like for ( gid = 0; gid < face->num_glyphs; gid ++ ) { /* blah blah blah */ } is very popular in various softwares using FT2. Regards, mpsuzuki |
[Prev in Thread] | Current Thread | [Next in Thread] |