From: Mayank J. <may...@gm...> - 2013-05-30 03:10:47
|
Matthew: I've browsed the code a bit, and myself find it not-so-simple to integrate this directly into font-forge. I think writing a standalone utility which makes use of features of fontforge to make this comparision would be a better idea. Can you suggest the libraries which would be required for achieving this ? Also I am wanting to expand the scope of glyph comparision to panagram comparision, ie a sample text written in one bdf font compared with a sample text written in another bdf font, How far is it possible to achieve this with the said utility ? On Thu, May 30, 2013 at 12:50 AM, <ms...@an...> wrote: > On Wed, 29 May 2013, Mayank Jha wrote: > > @Matthew: I do agree that adopting measures to scale and shift the > > glyph will improve the accuracy of the tool, can you suggest ways of > > making the techniques used by OCR people possible in font forge or any > > other font developing tool for linux? > > I don't know off the top of my head exactly how people solve these > problems in OCR, but a good starting point for finding out might be to > look at the sources of existing free OCR packages, such as OpenOCR and > GOCR. An important first step would be to decide just what > transformations should and shouldn't make a difference. For instance, > should shifting make a difference? Should scaling make a difference? > Should rotation make a difference? Depending on what problem you're > trying to solve, the answers will vary. > > One simple thing you might do would be to compute the mean (average) and > standard deviation of the X and Y coordinates of the black pixels in the > glyph. Then shift and rescale in X and Y to force the glyph to some > chosen fixed values for the centroid and standard deviation. That way two > glyphs that differ only by shifting and rescaling will end up the same. > Rotation is harder because of symmetry and near-symmetry, but I think it's > also less likely to be an issue for you. (That's where the Fourier-Bessel > thing could be applied - but do the version with just shifting and scaling > first!) > > I have my doubts about whether building this *directly into* FontForge is > really a good idea. I think you're underestimating how much work will be > involved in interfacing to the existing code base and you may find it > much pleasanter to write a standalone program. If I were doing it, I > would write a utility to run on BDF files and then export those from > FontForge. However, you're welcome to check out a copy of the FontForge > code and see what you can do with it. > > -- > Matthew Skala > ms...@an... People before principles. > http://ansuz.sooke.bc.ca/ > > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1 > _______________________________________________ > Fontforge-devel mailing list > Fon...@li... > https://lists.sourceforge.net/lists/listinfo/fontforge-devel > |