473,508 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

imagettftext w/o anti alias in small font sizes -> ugly

i have a problem using ImageTTFText: I want a Text in Arial , 8pt,
without Anti-Aliasing . The result is very ugly, how can i get it
proper like it would be displayed in the browser window or photoshop?
i tried a lot of things and searched, but did not find a solution to
this...help is very much appreciated! thank you
Apr 1 '08 #1
11 5635

<bl*************@googlemail.comwrote in message
news:c6**********************************@t54g2000 hsg.googlegroups.com...
>i have a problem using ImageTTFText: I want a Text in Arial , 8pt,
without Anti-Aliasing . The result is very ugly, how can i get it
proper like it would be displayed in the browser window or
photoshop?
i tried a lot of things and searched, but did not find a solution to
this...help is very much appreciated! thank you
Sorry to disappoint you, but it is not possible.

Without anti-aliasing or grey-scale interpolation, you can not get
smooth small text on a screen.

Consider this:
8 points would be around 8 pixels at 72 DPI. Try to draw a character
in those dimensions. You get pixelated graphics.

Which browser are you talking about anyway?
What OS?

All OSes and browsers have smooth text, meaning they do anti-aliasing
automatically.

Richard.

BTW:
There is no such unit as a Point on a computer screen. The only real
unit on a screen is a pixel. Points are for printing.
Apr 1 '08 #2
maybe this helps explaining:
http://img170.imageshack.us/img170/636/testsu2.jpg

you can't see too much text unfortunately, but look at the "0"...it's
noch displayed correct an so are all other characters...
Apr 1 '08 #3
Try writing to another image handler with 32px font and then copy it
in your image using imagecopyresampled() and making it's width and
height half of what it was...It's a trick I use for smoothing without
andti-aliasing and it should give you better results, but not as
smooth as you are hoping.

Regards,
George Maicovschi.
Apr 1 '08 #4
Hi George,

thx for the tip.
I will try that out now, the thing is: i dont want it to be anti-
aliased or smoothed in any way, but displayed just like it would be in
the browser window if you display it with font-size 11px..

greetings

stefan

On Apr 1, 9:58 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
Try writing to another image handler with 32px font and then copy it
in your image using imagecopyresampled() and making it's width and
height half of what it was...It's a trick I use for smoothing without
andti-aliasing and it should give you better results, but not as
smooth as you are hoping.

Regards,
George Maicovschi.
Apr 1 '08 #5

<bl*************@googlemail.comwrote in message
news:93**********************************@s19g2000 prg.googlegroups.com...
Hi George,

thx for the tip.
I will try that out now, the thing is: i dont want it to be anti-
aliased or smoothed in any way, but displayed just like it would be
in
the browser window if you display it with font-size 11px..

greetings

stefan

On Apr 1, 9:58 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
>Try writing to another image handler with 32px font and then copy
it
in your image using imagecopyresampled() and making it's width and
height half of what it was...It's a trick I use for smoothing
without
andti-aliasing and it should give you better results, but not as
smooth as you are hoping.

Regards,
George Maicovschi.
Stefan,
browser text IS anti-aliased in just about ALL browsers.
It is the OS that takes care of that.

You have to go back to WIN95 or Mac OS8 to see non-anti-aliased text
on screen...

Check here:
http://en.wikipedia.org/wiki/Font_rasterization

Richard.

Apr 1 '08 #6
sorry, i'm not actually finding the right words:

http://img368.imageshack.us/img368/8504/gderroryu9.jpg

here is my problem ...

On Apr 1, 10:39 pm, "Richard" <root@localhostwrote:
<blickensdoer...@googlemail.comwrote in message

news:93**********************************@s19g2000 prg.googlegroups.com...
Hi George,
thx for the tip.
I will try that out now, the thing is: i dont want it to be anti-
aliased or smoothed in any way, but displayed just like it would be
in
the browser window if you display it with font-size 11px..
greetings
stefan
On Apr 1, 9:58 pm, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
Try writing to another image handler with 32px font and then copy
it
in your image using imagecopyresampled() and making it's width and
height half of what it was...It's a trick I use for smoothing
without
andti-aliasing and it should give you better results, but not as
smooth as you are hoping.
Regards,
George Maicovschi.

Stefan,
browser text IS anti-aliased in just about ALL browsers.
It is the OS that takes care of that.

You have to go back to WIN95 or Mac OS8 to see non-anti-aliased text
on screen...

Check here:http://en.wikipedia.org/wiki/Font_rasterization

Richard.
Apr 1 '08 #7

<bl*************@googlemail.comwrote in message
news:ad**********************************@e10g2000 prf.googlegroups.com...
now i found my problem:

http://bugs.php.net/bug.php?id=25928&edit=1
I doubt it, since that doc is from 2003....

:(

R.
Apr 2 '08 #9
Richard,

His text is IN an image, I didn't know IE or any other browser
antialiases text in images :-)
Apr 2 '08 #10
On 2 Apr., 09:14, George Maicovschi <georgemaicovs...@gmail.com>
wrote:
Richard,

His text is IN an image, I didn't know IE or any other browser
antialiases text in images :-)
oh really??? ;) it's not about that. the picture is just an
explanation of how i want my text too look like. i think i used the
wrong words before (i should have left out the browsers, although my
browsers don't antialias small font-sizes), that's why there's such a
misunderstanding...
Apr 2 '08 #11
now i found my problem:
>
http://bugs.php.net/bug.php?id=25928&edit=1

I doubt it, since that doc is from 2003....

:(
but since it is due too a patent, i think it's still the point. at
least when i'm going into the config-file of freetype sourcecode, that
special line is still disabled
Apr 2 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
9130
by: bof | last post by:
I'm attempting to use ImageTTFText to render text to an image, I can get it to work if I a) specify the full font path b) switch off anti-aliasing c) specify an OpenType font (e.g. arial.ttf) ...
1
4233
by: Axier | last post by:
I cannot get the swedish character set on images. What can be wrong? I would very much appreciate help. regards, axier I can supply some code here and a link:...
0
1863
by: ljb | last post by:
The PHP manual has this note regarding the GD imagettftext() function: size The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2)....
0
1926
by: ljb | last post by:
Using PHP-4.3.11 with GD extension, bundled GD library, and freetype-2.1.9 (with X.org 6.8.1). I can't get the TrueType Font (TTF) bounding box to come out right. Whether using imagettftext() or...
7
3932
by: Randall Parker | last post by:
Using IE 6.x (whatever is the latest) on Windows 2000. For these two CSS definitions if I remove the 2 lines that have the "mso-" font family definitions (mso-fareast-font-family, and...
22
10708
by: Martin Eyles | last post by:
Hi, I have some text on a page in a small font. The font size has been OK in other applications, but in a web browser, the legebility suffers due to the anti-aliasing. Is there a way to turn off...
6
2520
by: monomaniac21 | last post by:
My url is www.aptitudehack.com Hi i cant get an image to display on another server though it does on mine. Here is the code for the page. The problem i think is the imagettftext function...
1
1522
by: Steve Belanger | last post by:
Hi, i am creating a 'design online' flash tool that allows me to design something with flash, throwing graphics and text elements. i then export that using XML data and have PHP create a jpeg...
9
3765
by: cdriccio | last post by:
Hello, I'm trying to make a gif image out of a total of 5 (currently) images. One background image and 4 small icons. This image also includes text of a specific font. Here are my issues. ...
3
3623
by: =?ISO-8859-1?B?QW5kcukgSORuc2Vs?= | last post by:
Hi, I'm experiencing very bad character spacing / anti-aliasing with a PHP installation. I compared it to another installation where it works. I'm using the following test code: $ih =...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.