Setting LCD - AA text rendering hint has no effect on my JLabel

Hello

I asked this question on the former Sun Java forums, but I don't know if this has not been seen because of the change to the new Oracle forums, so I'm asking again here:

I would like to use the rendering indicator "VALUE_TEXT_ANTIALIAS_LCD_HRGB" to improve the look of the rendering of text in Java under Windows XP. Using the JVM parameter
-Dawt.useSystemAAFontSettings=lcd
I can set each text rendering to use LCD Anti Aliasing, based by the JVM.

But I want the index rendering 'VALUE_TEXT_ANTIALIAS_LCD_HRGB' just for a particular type of component JLabel, so I tried to put this suspicion before the rendering of this element in this way:
public class MyAALcdLabel extends JLabel {
  @Override
  protected void paintComponent(Graphics g) {
    Graphics2D g2d = (Graphics2D)g;
    g2d.setRenderingHint(KEY_TEXT_ANTIALIASING, VALUE_TEXT_ANTIALIAS_LCD_HRGB);
 
    super.paintComponent(g2d);
  }
}
But it works (tested on Windows XP). With the JVM parameter above the label has the beautiful LCD Anti Aliasing, but with only the code above does not use this AA.

Does anyone know why defining this suspicion renderer before calling "super.paintComponent (g2d);" does not work?


Thanks a lot for your help!

Hello

First of all, I'm not an expert in all the rendering of fonts.

(1) the property of jvm definition - Dawt.useSystemAAFontSettings lcd = suggests that an indication that an lcd display is used. It does not involve the rendering index values explicitly.

(2) a search in java basic sources for various boards of anti-aliasing of text produces only a few hits in FontRenderContext. For LCD_HRGB I can not find any success. This suggests that he is not at all questioned. (at least not in sent with the JDK sources)

(3) a Google revealed more people having problems with these tips of anti-aliasing of text. So, apparently, you're not the only one :-)

Piet

Tags: Java

Similar Questions

  • Why the text size option has no effect?

    Hi, the text is really small. When you browse display option settings and make the text bigger using the a button has no effect on the actual pages. The text is still tiny. I tried do download 'no small text' but do get the message that it is incompatible. Is there a solution? Thank you.

    I have version 29.

    It is difficult, but that the Office font size change affects only 'some optimized Desktop Web sites '. It is really misleading.

    There is no way to adjust the font size on websites mobile optimized, which I assume you are trying to adjust.

  • Style - fx-nail-text-fill JFX 2.0 has no effect

    When I try to set the text style of culminating filler point for a text box, it has no effect. Point high-charging style, however, works as expected.
    public void start(Stage primaryStage) {
        final TextBox tb = new TextBox(100);
        tb.setStyle("-fx-font-size: 3em; -fx-text-fill: #0000ff; -fx-highlight-fill: #00ff00; -fx-highlight-text-fill: #ffffff;");
            
        final BorderPane root = new BorderPane();
        root.setStyle("-fx-padding: 20;");
        root.setCenter(tb);
            
        final Scene scene = new Scene(root, 600, 200, Color.BLACK);
            
        primaryStage.setTitle("JavaFX");
        primaryStage.setScene(scene);
        primaryStage.setVisible(true);
    }
    But this doesn't seem to be a problem of my custom styles because the default does not work either.
    The caspian.css in jfxrt.jar sets a white highlight-text-fill point, but when you select the contents of a text box, the text color is black.

    Is this a mistake in caspian.css (maybe the name of style is just misspelled) or a beta version current limitation?

    Kind regards

    Kai

    It is a bug. I created http://javafx-jira.kenai.com/browse/RT-14529 to follow up the matter.

  • Cannot disable new message sound in 31.3.0: prefs checkbox has no effect

    After you install this update, I was surprised to hear a beep at each arrival of a new e-mail message. The related checkbox (General::Play sound) has no effect. I get the sound if the box is checked or unchecked. After you change the setting stop and restart the application has no effect.

    Mac OS 10.9.5

    I wonder if it's line in unix versions where the system / Thunderbird. After all the OSX is a descendant of BSD unix. Make sure that OSX is not set to beep.

  • Layer text rendering bug with Mac OS 10.12 (Sierra)

    Hello

    I think I met a bug in text rendering. When I try to rename a composition or layer, text field, no long behaves normally, and instead, the text is misaligned and almost impossible to read. Here are a few screenshots to better describe the problem. I have reset my workspace, AE of redefinition and trashed the preferences without change. Current AE 13.8.1.

    1. a layer is selected.

    Screen Shot 2016-10-03 at 11.04.52 AM.png

    2. when I press ENTER to rename the layer, all the text disappears.

    Screen Shot 2016-10-03 at 11.04.58 AM.png

    3. type in the text field. Here you can see the issue of 'alignment '. The text is barely readable and shifted upwards.

    Screen Shot 2016-10-03 at 11.05.04 AM.png

    4. press on enter to confirm the change.

    Screen Shot 2016-10-03 at 11.05.06 AM.png

    Anyone know what is happening here? Thank you for your time.

    Sierra of MacOS is not yet an operating system supported for After Effects. There are some weird issues like this. This thread has an exchange of views on the issue and workarounds.

  • Rendering text solid composition layer after effects CC 2015 in Media Encoder produces jagged edges

    Make a layer of solid text in AE publication in Media Encoder product crenellated edges (really, really jagged, artifacts not only) on the text layer when 1280 Vimeo HD rendering:

    • Solid with the text layer, on the best quality switch
    • Composition of EI is imported on Media Encoder
    • 24 fps, 1280 x 780 Source Comp rendered using Vimeo 720 p

    After Effects:

    AE-image.png

    Media encode Vimeo 720 p:

    Media Encoder-image.png

    This looks much more than H.264 compression artifacts.  Any ideas why the text could be made so differently/badly in Media Encoder?

    So, it looks like a bug with the race on text rendering in Media Encoder:

    • OSX
    • After Effects 2015.0.1, build 13.5.1.48
    • Media Encoder 2015.0.1, build 9.0.1.29

    The text in red in the above examples has a white line (i.e. outline) applied with defined race "fill line".  Withdrawal of the race and redisplay in Media encode appears to render text smoothly, albeit without the trait, I wanted to actually on this subject.

  • How to set the ToolTip text programmatically?

    Anyone know how to set the ToolTip text programmatically? forms10g, db10g.

    Thank you
    m.

    Hello

    You can use the SET_ITEM_PROPERTY to define the criterion of an element tool tip.

    SET_ITEM_PROPERTY('.', TOOLTIP_TEXT, '');
    

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • Property of text rendering

    Firefox 3 took in charge the property of text rendering.

    Ff8 also supports the property above?
    From what I understand that is not, this is why I ask you, to be sure.

    In addition, it makes no sense supporting an older version and and a more recent is not.

    See https://developer.mozilla.org/en/CSS/text-rendering

  • Recorded a set of JPEG files to PDF has worked this morning, but now it doesn't.

    Recorded a set of JPEG files to PDF has worked this morning, but now it doesn't. I could have 10 images in the photo tray, choose "Print" in the Adobe PDF format and all pictures in the tray could be combined in a single file.

    I could choose the resolution of the image, the size of the paper, centering, all, for the whole group. Now, all it will use is 1 image in the main editing window, completely ignoring the images in the photo tray.

    I have 216 images for a publication. Batch processing allows the resolution smaller I want whether. I don't like if the files are large.

    How to return the method that I used earlier today? What has changed during my little break? I even closed the program and made a boot cold, still does not work.

    Any help is appreciated.

    Sharon

    HA! I found a way simpler to produce PDFs from a group of images! No need to use the Organizer, which adds many additional steps to the process.

    In the bar gray above the drawer to photos of the items, on the far right, there is a small dropdown menu with the choice of printing the tray as a file, save Bin as an album or Show Grid. It works perfectly!

    Sharon

  • How to set the banner text in Vcenter?

    Hello

    I'm looking how to set the Banner text in Vcenter not in the ESX Server.

    The banner message should apper when connecting users on the VCenter server.

    Thanks in advance.

    See screenshot:

  • How to set the RTL text in InDesign CC?

    How to set my RTL text in InDesign CC? The icon in the palette of paragraphs illustrated on the Adobe web site does not appear in my palette.

    Yes, the Adobe help is, ah, garbage. You get RTL tools if you download the ME version of InDesign CC. In order to get that, you must delete the version of InDesign that you now, open your creative cloud application, click on the gear-preferences icon in the upper right corner, go to the language settings and choose a language setting as "English (Arabic)" or "English (Hebrew). You will get an interface with all editing tools in English ME as the character orientation, orientation of the paragraphs and so forth.

  • Make the text "this catalog has no catalog under" no display

    Anyone know how to turn off, so to speak, the text "this catalog has no auxiliary catalog" or do not display? Or where I need to add the css to do this?

    Any help appreciated,


    See you soon,.


    Pat

    Hi Pat,

    You can hide the empty message in your catalog tag:

    {tag_cataloguelist rowLength targetFrame, notUsed, sortType, hideEmptyMessage, table/list}

    Something like {tag_cataloguelist, 5, true,}

  • How to set the default text for a text entry area dynamically?

    I do a simulation and grabbing a my user text entry.  I store in a variable and you want to use as the default text for a text entry later in the simulation box.  It seems like it would need current for a software simulation.  However, I don't see a way to set the default text.  If I put the variable in a legend, I would use the syntax $$variablename$ $.  I tried to fix this in the text by default, but it did not work.  It is not interpreted as a variable.  Does anyone do this?  Please share.  Thank you.

    I had a need to do that as well... put a variable as default text name in a TBE field.

    I have a widget AS3 to do this, which can be found here.  There a Cp 4 demo file that does exactly what you describe.

    I would like to know how it goes...

    Jim Leichliter

  • JDeveloper 10.1.3.4: text-align for the table column has no effect

    Hello

    I use JDeveloper 10.1.3.4. In a table, I have a column that contains the numbers, which are aligned to the left by default:
    Applied
    ---------------
    $50.00
    $2,160.00
    $50.00
    ---------------
    $2,260.00
    I want to be aligned with the right to examine more carefully:
    Applied
    ---------------
             $50.00
          $2,160.00
             $50.00
    ---------------
          $2,260.00
    Or better yet, have the cell with the longest string aligned to the Center, and all the other cells in alignment with it by the decimal point:
        Applied
    ---------------
          $50.00
       $2,160.00
          $50.00
    ---------------
       $2,260.00
    I looked in the property inspector, and the only thing that seems closest to the goal is text-align. I put this attribute on the right (text-align: right) for the column and the outputText, but has no effect. Everything is always embedded on the left. How to do things?

    Thank you!


    Newman

    Hello Newman,

    as I recall, I did using the formatType property = 'number' of the component of the column

    Kind regards

    Branislav

  • I want media files to play in outdoor applications. Media.Windows - Media - foundation.enabled has no effect for me.

    So ridiculous that something changes unexpectedly. I run a recording studio. This is how to make money to eat. I could always click on a wav/mp3/etc. and choose Save or open with an external drive. I have to do this a lot. The only way I seem to be able to do now is save it somewhere and then open it from there. Thank you. Twice the work. Media.Windows - Media - foundation.enabled = everything that has no effect for me. I want to say what I really think, but I'll bite my tongue.

    Edit: Are you kidding me? It is required to install a software to be able to post this question? Still bite my tongue...

    Try the media.directshow.enabled pref set to false.

Maybe you are looking for

  • PROBLEM when scanning multi-page pdf

    Hello Since the update of the sierra, I have a problem when scanning multiple page document. If I check the checkbox "merge pdf" in the scanner window, first page works fine but when I scan page #2 or one of the more page don't merge in the file pdf

  • Action Center is out of control

    I have reinstalled Windows 7 64 on my HPE-510 t. Everything works fine, including Laserjet P1006 and Deskjet 3050 printer and the USB controller.  Test the pages look beautiful.  Drive external drive has no problem talking to the computer. I have thi

  • .. more questions about the value of the slider extraction

    It is a matter of Alain S. .. .in your sugested code: The resistance value is equal to the value Y of the trace of the Z11re and the capacitor, or the value of the inductance are derived from the track of Z11im.  Inside the Structure of the event, th

  • Windows6. 1-KB917607-x 64.msu

    This installer wil WinHlp32 settles not on my Dell Latitude D630 with Windows 7 Ultimate Service Pack 1 installed. I downloaded and registered, then tried to install it and downloaded and run the installer directly, and continue to receive the error

  • There is no icon in the taskbar. How do I order to print?

    After installation of my printer there is no icon in the taskbar. I'm unable to print.