Path: blob/master/src/java.desktop/share/classes/sun/font/CompositeFontDescriptor.java
41154 views
/*1* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.font;2627/**28* Encapsulates the information that 2D needs to create a composite font,29* the runtime representation of a logical font.30*/31public class CompositeFontDescriptor {3233private String faceName;34private int coreComponentCount;35private String[] componentFaceNames;36private String[] componentFileNames;37private int[] exclusionRanges;38private int[] exclusionRangeLimits;3940/**41* Constructs a composite font descriptor.42* @param faceName the font face name, i.e., the family name suffixed43* with ".plain", ".bold", ".italic", ".bolditalic".44* @param coreComponentCount the number of core fonts, i.e., the ones45* derived from a non-fallback sequence.46* @param componentFaceNames the face names for the component fonts47* @param componentFileNames the file names for the component fonts48* @param exclusionRanges an array holding lower and upper boundaries49* for all exclusion ranges for all component fonts50* @param exclusionRangeLimits an array holding the limits of the51* sections for each component font within the previous52* array53*/54public CompositeFontDescriptor(String faceName,55int coreComponentCount,56String[] componentFaceNames,57String[] componentFileNames,58int[] exclusionRanges,59int[] exclusionRangeLimits) {60this.faceName = faceName;61this.coreComponentCount = coreComponentCount;62this.componentFaceNames = componentFaceNames;63this.componentFileNames = componentFileNames;64this.exclusionRanges = exclusionRanges;65this.exclusionRangeLimits = exclusionRangeLimits;66}6768public String getFaceName() {69return faceName;70}7172public int getCoreComponentCount() {73return coreComponentCount;74}7576public String[] getComponentFaceNames() {77return componentFaceNames;78}7980public String[] getComponentFileNames() {81return componentFileNames;82}8384public int[] getExclusionRanges() {85return exclusionRanges;86}8788public int[] getExclusionRangeLimits() {89return exclusionRangeLimits;90}91}929394