Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3274312
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:01:26+00:00 2026-05-17T19:01:26+00:00

I am trying to smooth text rendering using anti-aliasing. But it’s not anti-aliased. First

  • 0

I am trying to smooth text rendering using anti-aliasing.
But it’s not anti-aliased.

http://tinypic.com/r/2h7dy1i/4

First line is a png image created using pango and cairo.
Second line is just an html <span> tag. It’s in firefox, Ubuntu with Gnome DE.
The difference can be better understood if you compare “W” and “v”
between two lines.

The code responsible to draw text can be found on http://pastie.org/1073683
Font options are set on lines 17 and 20 like so:

// setting up antialiasing
cairo_font_options_set_antialias(cfo, CAIRO_ANTIALIAS_GRAY);

// set the font options to cairo
cairo_set_font_options(this->cro, cfo);

Could anyone please tell me how can I make those two lines look the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:01:26+00:00Added an answer on May 17, 2026 at 7:01 pm
    cairo_font_options_set_antialias(cfo, CAIRO_ANTIALIAS_GRAY);
    

    You asked for it, you got it. To get a match you’d need CAIRO_ANTIALIAS_SUBPIXEL. This is however not appropriate when you draw text to an image that might be displayed on another machine. There’s no guarantee that the monitor on that machine is an LCD panel with the RGB stripes in a predictable order. Or that it in landscape orientation. Or that it is displayed with the exact original size. When there’s a mismatch, the text will look quite poor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to build a marquee control with smooth text animation. Current efforts include: Using
I am trying to make this a smooth polygon using OpenGL, but it is
I am trying to create a watermark text to my custom view, but the
When trying to load an Image and copy a part of it or smooth,
I'm trying to draw an anti-aliased trapezoid by starting at the top and drawing
i'm trying to make smooth animation during change class with Jquery. But it works
I'm trying out some dynamic web page background generation using lines and text. Take
I am trying to rotate vectors using matrices, but got confused. I thought all
Trying to comply with StackOverflow's suggestion of asking a question, not creating a discussion,
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.