|
From: | Vincent Torri |
Subject: | Re: [ft-devel] [GSoC'19] ftinspect questions |
Date: | Wed, 3 Jul 2019 19:34:13 +0200 |
Hi Werner,I have integrated the basic functionality of 'ftview'. I have a UI related questionand it would be great to have your opinion on the same before I start on it.As all the demo programs have some features specific to each. For example 'ftview'has options for stroke, slant etc. So, I was wondering about creating option tabs specificto some programs or instead just add all the features in a normal fashion in the layout andjust disable the options not meant for the program in use.Also, I created radio buttons for different functionality as I mentioned in the timeline but Arminsuggested for tabs in place of radio buttons. What do you think? According to me, radio buttonsseem more accessible.For reference, I attached a screenshot of the current view of the interface.Thanks!On Wed, Jul 3, 2019 at 11:13 AM Werner LEMBERG <address@hidden> wrote:
> I need to obtain the glyph index and that could be done using the
> two methods .i.e * FTC_CMapCache_Lookup
> <https://www.freetype.org/freetype2/docs/reference/ft2-cache_subsystem.html#ftc_cmapcache_lookup>*
> and *FT_Get_Char_Index
> <https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_get_char_index>*
> .
IMHO, `FT_Get_Char_Index' is sufficient. For displaying single
characters in `ftinspect' (or a bunch of them once in a separate
window for ftview-like stuff) you don't need a cache for speeding up
things.
> - Now, Considering FTC_CMapCache_Lookup, it expects int type
> character code which is fine but along with that, it expects index
> of character map which is being used but since it could have more
> than one character map, index of which character map should be
> provided or how to know which character map is being used?
`FTC_CMapCache_Lookup' is agnostic of the cmap. It simply caches
(cmap index, character code, glyph index) triplets. If the glyph
index is not in the cache, the function uses the cmap index value to
temporarily switch to the proper cmap before accessing the character
code.
Normally, an application uses a single cmap only. In that case you
would set up the cmap in advance, then passing -1 as the value for the
cmap index to the function.
Werner
--_______________________________________________Veeki
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel
[Prev in Thread] | Current Thread | [Next in Thread] |