/    Sign up×
Community /Pin to ProfileBookmark

Generating bold text inside an image from a .ttf file using a php method

Hi again,

I’ve been searching all over and the closest I came to somehow achieving bold text (kind of) was to generate the same text multiple times in the same image slightly offset from each other. But it looks really crappy.

Is this possible? I wish there were something like imagecreateboldttftext() but I can’t find anything like that. Does anybody know of any method to get bold text that doesn’t look extremely ugly (preferably to look exactly or as close as possible like if it were a regular font and the <B> tag were applied).

Thanks a lot,
Douglas

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@bokehJun 18.2006 — It you want bold use a bold font. Also font images usually work best as truecolour and not palette.
Copy linkTweet thisAlerts:
@chrisranjanaJun 19.2006 — Have you tried all TEXT options as mentioned here

http://www.php.net/manual/en/function.imagettftext.php

namely

"text" => null,

"size" => null,

"font" => null,

"color" => "0x000000",

"alpha" => "100",

"padding" => 0,

"width" => null,

"height" => null,

"align" => "left",

"valign" => "middle",

"bgcolor" => "0xffffff",

"antialias" => 4[/QUOTE]
×

Success!

Help @DJRobThaMan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...