On Sat, 12 Jul 2025 11:12:16 GMT, Valery Semenchuk <d...@openjdk.org> wrote:

>> I have changed the bug summary so you will need to change the PR summary to 
>> match -
>> 8360136: RFE: Add TextAttributes for OpenType font figure style features
>
> @prrace about tests. I can draw test image with font which is support tnum 
> feature, and validate without it. Primitive one.
> 
> For example
>  * at start - need load font, which supports this features. For example 
> `Inter` (also need attach license of it inside repo?)
>  * draw image `0123456789` with `pnum` 
>  * <img width="200" height="50" alt="pnum" 
> src="https://github.com/user-attachments/assets/2e80a463-a608-425f-a264-6097e415d397";
>  />
>  * draw image `0123456789` with `tnum`
>  * <img width="200" height="50" alt="tnum" 
> src="https://github.com/user-attachments/assets/62600f4e-1094-4fce-bd09-3876b4a8610e";
>  />
>  * if all bytes of images equals - it's means `tnum` not works. 
> 
> Also check default instance of `Font` without options
> 
> We can add this images inside repo, and validate image drawing (not sure)

@VISTALL You can take a look at 
https://github.com/openjdk/jdk/blob/bcd86d575fe0682a234228c18b0c2e817d3816da/test/jdk/java/awt/font/TextLayout/FormatCharAdvanceTest.java
 - it has a good example of synthetic font generated specifically for the test 
and embedded into the test as base64. This avoids the hussle with licences and 
whatnot.
I would also suggest to avoid golden-image tests, as those tend to be 
burdensome to maintain. But in your case you can probably inspect line metrics 
and compare the widths of a sample text.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26144#issuecomment-3069670489

Reply via email to