[OpenJDK 2D-Dev] RFR: 8221741 [AIX] Unexpected X11 bitmap fonts are loaded because of fontconfig.properties

Ichiroh Takiguchi takiguc at linux.vnet.ibm.com
Thu Apr 18 06:55:56 UTC 2019


Hello Phil.

I appreciate your reply.
I put problem analysis information in JDK-8221741 [1].

The issue is AIX's Xserver was frozen about 25 secs on my local AIX box.
According to my problem analysis,
In this case, Java tried to load large 11 X11 bitmap fonts via 
XLoadQueryFont() on Xlib.
The situation can emulate by "xlsfonts -ll" command, like:

$ time xlsfonts -ll -fn 
"-monotype-sansmonowt-medium-r-normal--*-80-72-72-*-*-ucs2.cjk_japan-0"
...
real    0m2.07s
user    0m0.00s
sys 0m0.00s

One of solution is, Unix's fontconfig.properties can support 
TrueType/Type1 font name format. [2]

Anyway,
I don't know the reason why X11 bitmap font is required for logical 
font.
(I don't know how to use X11 bitmap font for physical font.
I could not see X11 bitmap font name via
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames().)
I just want to fix Xserver frozen issue.
I appreciate your advice.
(Other solutions are welcome)

[1] https://bugs.openjdk.java.net/browse/JDK-8221741
[2] https://cr.openjdk.java.net/~itakiguchi/8221741/webrev.00/

Thanks,
Ichiroh Takiguchi
IBM Japan, Ltd.

On 2019-04-04 01:09, Philip Race wrote:
> On 4/2/19, 9:27 AM, Ichiroh Takiguchi wrote:
>> Hello.
>> (I am sorry to post it again. Previously, I posted the wrong mailing 
>> list.)
>> 
>> Could you review the fix ?
>> 
>> Bug:    https://bugs.openjdk.java.net/browse/JDK-8221741
>> Change: https://cr.openjdk.java.net/~itakiguchi/8221741/webrev.00/
>> 
>> I'd like to obtain a sponsor for this issue.
>> 
>> On AIX platform, fontconfig.properties file is used to pick up proper 
>> fonts.
>> TrueType font settings are written by XLFD format on 
>> fontconfig.properties file.
>> 
>> On current implementation, Java tries to load X11 bitmap fonts even if 
>> these are not used.
> 
> I think you need to clarify what you mean here.
> 
> I'd like you to provide a step by step analysis of what happens and
> what the effect of your proposed change is on AIX *AND* what it might
> mean for other X11 platforms, as I don't have time to reverse engineer 
> the
> reasons for the odd-looking change.
> It looks like a hack to short-circuit support your syntax.
> Right now I am saying no to this.
> 
>> This font load work is almost name as "xlsfonts -ll".
>> It spends many CPU time and memories.
>> 
>> Just font name format should be supported.
> 
> Not clear enough for me.
> 
> -phil.
>> 
>> To SAP representative,
>> I have a question about copyright year on 
>> make/data/fontconfig/aix.fontconfig.properties.
>> Please let me know how I should write down copyright year.
>> 
>> Thanks,
>> Ichiroh Takiguchi
>> IBM Japan, Ltd.
>> 



More information about the 2d-dev mailing list