Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That system component is called a font renderer or font rasterizer. It is responsible for converting a sequence of character codes into pixels based on glyphs defined in a font. As other answers have stated, the various character encoding values you can get and set from Java are irrelevant. When the JVM gives the font renderer a sequence of character codes, it tells it what encoding applies (probably UTF16, but this is transparent to the Java programmer.) The font renderer uses the font encoding specified in the font file to match up the corresponding glyphs.</p> <p>Current versions of Windows and Mac OS X come with excellent font renderers. </p> <p>The first point of confusion is that the JRE comes with its own font renderer, as part of the Java2D platform, and this is what Swing uses. There ought to be an option to control whether Java uses its own renderer or the system one.</p> <p><strong>EDIT:</strong> As <a href="https://stackoverflow.com/users/304/mcdowell">McDowell</a> pointed out in a comment, on OS X you can enable the system renderer by setting the Java property apple.awt.graphics.UseQuartz=true.</p> <p>The second point of confusion is that ligatures are optional in English. A desktop publishing application will substitute an "ffl" ligature (a single glyph in the font) when it sees a word like "shuffle", but most other applications don't bother. Based on what you've said about Devanagari (and what I just read on Wikipedia) I gather the ligatures are not optional in that language.</p> <p>By default, the Java2D font renderer does not do ligatures. However, the JavaDoc for java.awt.font.TextAttribute.LIGATURES says that ligatures are always enabled for writing systems that require them. If that isn't your experience, you may have found a bug in the Java2D font renderer. Meanwhile, try using the Font constructor that takes a map of font attributes, including TextAttribute.LIGATURES.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload