freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [GSoC] ftinspect


From: Werner LEMBERG
Subject: Re: [ft-devel] [GSoC] ftinspect
Date: Tue, 14 Mar 2017 22:41:13 +0100 (CET)

Hello Phillipp!


Thanks for your interest in working on FreeType.

> the ftinspect improvement task proposed on the GSoC ideas page has
> caught my attention.  [...]
> 
> First of all there are a bunch of text-mode utilities in the demos
> repository such as ftbench or ttdebug. Should they be considered for
> GUIfication, too?
>
> Or should the proposal be restricted to the tools that currently
> have a graphical interface (ftdiff, ftgamma, ftgrid, ftmulti,
> ftstring, and ftview)?  Integrating all tools into ftinspect could
> naturally mean that the feature set of some utilities would have to
> be limited in order for the overall proposal to be realistically
> achievable in the GSoC timeframe.
 
ftbench: No.  ttdebug: This would be very nice, but it would blow up
the task enormously.  Note that the FontForge font editor already
comes with a TrueType bytecode debugger (using FreeType); this might
give you an idea of the additional work.

  https://fontforge.github.io/en-US/

> Then I have seen that the ftgrid-like features that ftinspect
> currently displays are not fully implemented, e.g. color images
> modes (for subpixel AA/LCD filtering) and gamma expansion is
> missing, so I think implementing this could be a good starting
> point.

Definitely.

> As far as gamma is concerned, it seems that Qt does not support the
> necessary blending calculations [1] that were implemented in the old
> utilities.  So: Should the gamma blending work exactly the same as
> before (meaning that the blending code from gblender.c needs to be
> ported)?

This is a good question.  I think Alexei or Nikolaus can say more.
Note that it would be great to have a linear blending mode so that
stem darkening gives the expected results.  Similarly, a non-linear
blending could also be added to demonstrate why linear blending is a
good thing...

> Also, I have seen that the current ftinspect greyscale color map is
> implemented as 
> 
>   for (int i = 0xFF; i >= 0; i--)
>     grayColorTable.append((0xFF - i) << 24
>                           | i << 16
>                           | i << 8
>                           | i);
> 
> This seems to be neither a linear coverage-to-greyscale-mapping
> (because of the both varying alpha/grey) nor does it correspond to a
> gamma curve as far as I understand it.  Is there a particular reason
> why it was chosen to be this way?

This is most probably because of lack of knowledge on my side.  I
wrote most of the code under heavy time pressure (for a conference
demo), and I currently can't remember why I did it like that – I guess
I found similar code somewhere in the internet.

> Furthermore, most of the other GUI tools (ftdiff, ftmulti, ftstring,
> and ftview) all render a text string in one way or another, so I
> think that they could be combined under one unified UI that has all
> the options.

Yes.

> Maybe even combined somehow with the grid view so that you can
> e.g. zoom in on the hinting comparison and see the differences on a
> pixel level.  I am not sure at all what to do with ftgamma though,
> so I would appreciate any advice on that.  Is just displaying the
> images as they are now in the Qt GUI enough?

I think so, yes.  Alexei?

> As a last general question: I have seen that some organizations have
> their own templates for proposals, i.e. they require specific
> questions to be answered.  Does the FreeType project have any
> similar requirements?

No, we don't have such a template.

> I also have some thoughts about refactoring the existing code, but I
> should probably stop here for now.

Any patches to improve FreeType are highly welcomed :-)


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]