src/share/classes/java/awt/font/NumericShaper.java

Print this page
rev 10196 : [mq]: 8038092

*** 1,7 **** /* ! * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 29,38 **** --- 29,39 ---- import java.io.ObjectOutputStream; import java.util.Arrays; import java.util.Comparator; import java.util.EnumSet; import java.util.Set; + import sun.misc.SharedSecrets; /** * The <code>NumericShaper</code> class is used to convert Latin-1 (European) * digits to other Unicode decimal digits. Users of this class will * primarily be people who wish to present data using
*** 132,141 **** --- 133,150 ---- * * @since 1.4 */ public final class NumericShaper implements java.io.Serializable { + + // For access from java.text.Bidi + static { + if (SharedSecrets.getJavaAWTFontAccess() == null) { + SharedSecrets.setJavaAWTFontAccess(new JavaAWTFontAccessImpl()); + } + } + /** * A {@code NumericShaper.Range} represents a Unicode range of a * script having its own decimal digits. For example, the {@link * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT * ZERO (U+0E50) to THAI DIGIT NINE (U+0E59).