Hello,
I have been trying to use .pfb fonts (Type 1) to generate dynamic
images. However the text in the images is very aliased and blurred.
This is of course not because of the font or the font style itself.
Please let me know if you have any ideas or opinions about it. Code
snippet:
$SIZE = 14;
$FONT_PATH = "/usr/X11R6/lib/X11/fonts/Type1/hell.pfb";
$FONT = ImagePSLoadFont($FONT_PATH);
$im = ImageCreate(100, 100);
$white = ImageColorAllocate($im, 255, 255, 255);
$gray = ImageColorAllocate($im, 134, 134, 134);
// draw
ImagePSText($im, $str, $FONT, $SIZE, $gray, $gray, 0, $SIZE,0,0,0,16);
ImagePSFreeFont($FONT);
Thanks. 1 1762
In general, Type 1 fonts don't look very good at small point sizes. You
might want to generate the image at a large size and then resample it down.
Also, if I remember correctly, the FreeType rasterer can perform
anti-aliasing on true-color bitmaps. Try using imagecreatetruecolor()
instead of imagecreate() and see if you see any improvement.
Uzytkownik "Subhash" <su**********@yahoo.com> napisal w wiadomosci
news:fd**************************@posting.google.c om... Hello, I have been trying to use .pfb fonts (Type 1) to generate dynamic images. However the text in the images is very aliased and blurred. This is of course not because of the font or the font style itself. Please let me know if you have any ideas or opinions about it. Code snippet:
$SIZE = 14; $FONT_PATH = "/usr/X11R6/lib/X11/fonts/Type1/hell.pfb"; $FONT = ImagePSLoadFont($FONT_PATH); $im = ImageCreate(100, 100); $white = ImageColorAllocate($im, 255, 255, 255); $gray = ImageColorAllocate($im, 134, 134, 134);
// draw ImagePSText($im, $str, $FONT, $SIZE, $gray, $gray, 0, $SIZE,0,0,0,16); ImagePSFreeFont($FONT);
Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Shmuel (Seymour J.) Metz |
last post by:
I've got a document that StarOffice converted into HTML, and I'm
trying to clean up the cuft that it generated. I put together some
basic styles, and tied using them: the results are puzzling. The...
|
by: Fabian Neumann |
last post by:
Hi!
I got a problem with font-family inheritance. Let's say I have CSS
definitions like:
p {
font:normal 10pt Verdana;
}
strong {
font:normal 14pt inherit;
|
by: J |
last post by:
I've run CSSCheck on my style sheets and I always get a warning
similar to this:
"font: bold 9pt/100% sans-serif
Warning: Absolute length units should not generally be used on the Web ..."
...
|
by: Paul D. Sullivan |
last post by:
I've been trying to find out how to increase the font size in the
text entry fields in Invision Power Board 1.3 for a while. The
part where you enter your post and do the quick reply and all
that...
|
by: Dr John Stockton |
last post by:
Assuming default set-ups and considering all reasonable browsers,
whatever that may mean, what should an author expect that his readers in
general will see (with visual browsers) for a page with...
|
by: tshad |
last post by:
I am having trouble with links in my DataGrid.
I have Links all over my page set to smaller and they are consistant all
over the page in both Mozilla and IE, except for the DataGrid.
Here is a...
|
by: Sakharam Phapale |
last post by:
Hi All,
How to preserve the old font properties while changing new one?
I posted same question 2 months back, but I had very small time then.
eg. "Shopping for" is a text in RichTextBox and...
|
by: Daniel Kaplan |
last post by:
I have the item below at the top of my style sheet. And it seems that
the font-szie is ignored. I know that my linked style sheet is being
read, and used because if I remove the font-family line,...
|
by: maya |
last post by:
I have heard so much preaching here about how font sizes should be set
as percentages so users can change font-sizes on their browsers... ok,
so now at work am working on a site where we need to do...
|
by: kheitmann |
last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |