< prev index next >

src/java.desktop/share/classes/sun/font/FontDesignMetrics.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 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 --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, 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
*** 485,495 **** } return (int) (0.5 + width); } ! public int charsWidth(char data[], int off, int len) { float width = 0; if (font.hasLayoutAttributes()) { if (len == 0) { return 0; --- 485,495 ---- } return (int) (0.5 + width); } ! public int charsWidth(char[] data, int off, int len) { float width = 0; if (font.hasLayoutAttributes()) { if (len == 0) { return 0;
*** 522,532 **** /** * This method is called from java.awt.Font only after verifying * the arguments and that the text is simple and there are no * layout attributes, font transform etc. */ ! public Rectangle2D getSimpleBounds(char data[], int off, int len) { float width = 0; int limit = off + len; for (int i=off; i < limit; i++) { char ch = data[i]; --- 522,532 ---- /** * This method is called from java.awt.Font only after verifying * the arguments and that the text is simple and there are no * layout attributes, font transform etc. */ ! public Rectangle2D getSimpleBounds(char[] data, int off, int len) { float width = 0; int limit = off + len; for (int i=off; i < limit; i++) { char ch = data[i];
< prev index next >