View Issue Details

IDProjectCategoryView StatusLast Update
0001406ScribusScripterpublic2008-04-21 20:18
ReporterringercAssigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status confirmedResolutionopen 
Platformx86 LinuxOSFedora CoreOS Version1
Product Version1.3.0cvs 
Summary0001406: Add text metrics to scripter
DescriptionTo be useful for any sort of automatic pagination, the scripter really needs font metrics and text metrics.

At minimum, a string width function is required. Something like:

stringWidth("Bork! Bork! Bork!", font="Utopia Bold", size=48, kerning=0, hscale=1)

without the way to know string widths, it's nigh impossible to decide how big to make frames and where to put them.

It would also be extremely useful to have a way to tell when text doesn't fit in a frame, how many lines text takes up in a frame, and how much vertical space a particular block of text will take up in a particular style.
TagsNo tags attached.
Patch

Relationships

related to 0002708 closedcezaryece Autosizing of frames 
child of 0002058 assignedavox Text and font metrics 
child of 0003813 acknowledged Metabug: Scripter 

Activities

Tsoots

2004-12-18 21:24

reporter   ~0003178

This would be nice to have not only for scripter. Could be then used to create automatic lists where the first line indent could be set precisely with any font and font size and those lines would align (even the first line after the bullet, or number what ever is used as a list item symbol)

ringerc

2004-12-20 06:05

reporter   ~0003185

So far, I haven't been able to see how to do this. Unassigning, though I will continue to look into it.

subik

2005-01-01 16:14

manager   ~0003313

the font metrics are imho must for em, en, thin etc. space too...

fcoiffie

2005-06-03 09:16

reporter   ~0004882

I agree it could be useful to one of these things.

For my current needs, I would like to know if a text fit in a frame or not (to resize the frame or change the font size). I think it's not difficult to do.

Secondly, knowing the width of a text could be very, very useful. Maybe it could be easier to know the effective height (and the number of lines) of a text in a frame .

plinnell

2008-04-21 20:18

viewer   ~0019528

Reminder sent to: user23

Issue History

Date Modified Username Field Change
2004-12-17 02:53 ringerc New Issue
2004-12-17 03:19 ringerc Category Default => Scripter
2004-12-18 21:24 Tsoots Note Added: 0003178
2004-12-20 06:04 ringerc Assigned To ringerc =>
2004-12-20 06:05 ringerc Note Added: 0003185
2004-12-20 06:05 ringerc Status assigned => new
2005-01-01 16:14 subik Note Added: 0003313
2005-06-03 09:16 fcoiffie Note Added: 0004882
2005-06-04 08:28 ringerc Status new => confirmed
2005-06-06 09:19 ringerc Reported by => ringerc
2005-06-06 09:19 ringerc Product Version 1.2.1cvs => 1.3.0cvs
2005-06-06 09:20 ringerc Relationship added child of 0002058
2005-10-11 16:32 ringerc Relationship added related to 0002708
2006-05-13 21:39 christoph_s Relationship added child of 0003813
2008-04-21 20:18 plinnell Note Added: 0019528