src/java.desktop/share/classes/java/awt/Font.java
Print this page
@@ -333,11 +333,11 @@
* and Korean when laying out text.
*/
public static final int CENTER_BASELINE = 1;
/**
- * The baseline used in Devanigiri and similar scripts when laying
+ * The baseline used in Devanagari and similar scripts when laying
* out text.
*/
public static final int HANGING_BASELINE = 2;
/**
@@ -606,11 +606,11 @@
private Font(File fontFile, int fontFormat,
boolean isCopy, CreatedFontTracker tracker)
throws FontFormatException {
this.createdFont = true;
/* Font2D instances created by this method track their font file
- * so that when the Font2D is GC'd it can also remove the file.
+ * so that when the Font2D is GC'ed it can also remove the file.
*/
FontManager fm = FontManagerFactory.getInstance();
this.font2DHandle = fm.createFont2D(fontFile, fontFormat, isCopy,
tracker).handle;
this.name = this.font2DHandle.font2D.getFontName(Locale.getDefault());
@@ -850,11 +850,11 @@
* varying sizes, styles, transforms and font features. This
* method does not close the {@link InputStream}.
* <p>
* To make the <code>Font</code> available to Font constructors the
* returned <code>Font</code> must be registered in the
- * <code>GraphicsEnviroment</code> by calling
+ * <code>GraphicsEnvironment</code> by calling
* {@link GraphicsEnvironment#registerFont(Font) registerFont(Font)}.
* @param fontFormat the type of the <code>Font</code>, which is
* {@link #TRUETYPE_FONT TRUETYPE_FONT} if a TrueType resource is specified.
* or {@link #TYPE1_FONT TYPE1_FONT} if a Type 1 resource is specified.
* @param fontStream an <code>InputStream</code> object representing the
@@ -1016,11 +1016,11 @@
* to retrieve font data. Thus the results are undefined if the file
* is changed, or becomes inaccessible.
* <p>
* To make the <code>Font</code> available to Font constructors the
* returned <code>Font</code> must be registered in the
- * <code>GraphicsEnviroment</code> by calling
+ * <code>GraphicsEnvironment</code> by calling
* {@link GraphicsEnvironment#registerFont(Font) registerFont(Font)}.
* @param fontFile a <code>File</code> object representing the
* input data for the font.
* @return a new <code>Font</code> created with the specified font type.
* @throws IllegalArgumentException if <code>fontFormat</code> is not
@@ -1683,11 +1683,11 @@
strStyle + ",size=" + size + "]";
} // toString()
/** Serialization support. A <code>readObject</code>
- * method is neccessary because the constructor creates
+ * method is necessary because the constructor creates
* the font's peer, and we can't serialize the peer.
* Similarly the computed font "family" may be different
* at <code>readObject</code> time than at
* <code>writeObject</code> time. An integer version is
* written so that future versions of this class will be