texttoimage - how to set character size?

Author Message

Valentin Svelland

Monday 01 September 2003 6:42:37 am

I'm trying out the useful texttoimage-operator but I'm having trouble setting the font size of the image-output.

This works fine:
{$content_version.data_map.somevariable.content|texttoimage('arial')}

..but generates a rather large fontsize-display of the content of my variable. So in lack of documentation I try this (which doesn't work as well):

{$content_version.data_map.somevariable.content|texttoimage('arial',12)}

I'm trying to set the font size of image-output to 12 px here, and have tried doing so in a lot of different ways of syntax.

Anyone know if it's even possible to scale the font size of the texttoimage()-operator?? :)

Paul Forsyth

Monday 01 September 2003 6:59:43 am

Have you looked at the settings file 'texttoimage.ini'?

I've not used it personally but that file seems to have a lot of font info.

Paul

Björn Dieding@xrow.de

Monday 01 September 2003 8:45:35 am

that's the place to look. I have personal experience with it. Of cource you can set the font size

I would recommend defining all needed definitions. Over the texttoimage.ini
and use it like this.
{$content_version.data_map.somevariable.content|texttoimage('customstyle')}

The second option didn't work out right for me too.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Valentin Svelland

Thursday 04 September 2003 1:40:03 am

Thanks guys, I figured it out with your help. Made a new style in texttoimage.ini.

Thomas Brandl

Wednesday 10 September 2003 5:38:15 am

You can also specify the font-size directly:
{$content|texttoimage('arial',,2)}

Note: Two commas!, font-size is third argument

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:27:01
Script start
Timing: Jan 31 2025 06:27:01
Module start 'layout'
Timing: Jan 31 2025 06:27:01
Module start 'content'
Timing: Jan 31 2025 06:27:02
Module end 'content'
Timing: Jan 31 2025 06:27:02
Script end

Main resources:

Total runtime1.0134 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.2500151.2266
Module start 'layout' 0.00680.0032 739.476636.6797
Module start 'content' 0.01001.0025 776.15631,026.7109
Module end 'content' 1.01250.0009 1,802.867211.8125
Script end 1.0134  1,814.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3077160.0002
Check MTime0.00120.1229160.0001
Mysql Total
Database connection0.00130.126410.0013
Mysqli_queries0.953294.0544670.0142
Looping result0.00070.0722650.0000
Template Total0.973696.120.4868
Template load0.00200.195120.0010
Template processing0.971695.870220.4858
Template load and register function0.00120.117310.0012
states
state_id_array0.00180.179710.0018
state_identifier_array0.00270.270220.0014
Override
Cache load0.00170.1640290.0001
Sytem overhead
Fetch class attribute can translate value0.00050.047440.0001
Fetch class attribute name0.00220.217870.0003
XML
Image XML parsing0.00270.264940.0007
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00240.2353220.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs