freetype
[Top][All Lists]
Advanced

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

Re: [ft] Question about CPAL and FT_Palette_Data_Get (version 2.10.1)


From: Werner LEMBERG
Subject: Re: [ft] Question about CPAL and FT_Palette_Data_Get (version 2.10.1)
Date: Mon, 05 Aug 2019 10:02:05 +0200 (CEST)

> I'm trying to read FT_Palette_Data (using FT_Palette_Data_Get) but I'm
> always getting nulls (and no errors):
>
>   num_palettes = 1
>   palette_name_ids = NULL
>   palette_flags = NULL
>   num_palette_entries = 2
>   palette_entry_name_ids = NULL

The data is correct: The font contains one palette, and there are two
palette entries per palette.  However, the font does not contain name
IDs for either the palette names or the palette entry names.

> Is there another function that I'm supposed to call before getting
> the palette? (if so, I think it would be worthwhile to add a note in
> FT_Palette_Data_Get docs)

To get the colors of a palette use function `FT_Palette_Select'.


    Werner



reply via email to

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