View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002058 | Scribus | Internal | public | 2005-06-06 09:20 | 2005-07-03 14:03 |
Reporter | Assigned To | avox | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | x86 Linux | OS | Fedora Core | OS Version | 3 |
Product Version | 1.3.0cvs | ||||
Summary | 0002058: Text and font metrics | ||||
Description | We need some internal APIs for doing things like determining the width of a string at a given font, finding out if some text will fit in a certain frame, etc. Particularly important IMO are: double stringWidth(QString text, QString fontFace, int fontSizeDeciPt, float hScalePercent=1.0, float trackingAdj=0.0) to return the width, in pt, of a string with the given text style. Another version to take a char style, once those are supported, would also be helpful. double totalFontHeight(QString fontFace, int fontSizeDeciPt) to return the height in pt of a line of text in the specified font from highest rise to lowest drop. double maximumFontRise(QString fontFace, int fontSizeDeciPt) double maximumFontDrop(QString fontFace, int fontSizeDeciPt) to return the maximum rise/drop above/below the baseline, respectively, of the font at the given size. This is useful for things like determining where the top of a text frame should be in order to exactly place the text its self. All these could probably be virtual members of Foi (without the font name), and/or members of ScFonts. double textHeight(QString text, PageItem* item, QString fontFace, int fontSizeDeciPt, float hScalePercent=1.0, float trackingAdj=0.0, float leading=-1) double textHeight(QString text, double width, QString fontFace, int fontSizeDeciPt, float hScalePercent=1.0, float trackingAdj=0.0, float leading=-1) to return the total height of a block of text in a given PageItem or in a frame of a given width. Useful for automated layout decisions. These could be useful for all sorts of things, though I'm mostly interested in them for scripting purposes. Riku had some other suggestions in 0001406 . | ||||
Tags | No tags attached. | ||||
Patch | |||||
related to | 0001405 | acknowledged | Support frame fit adjustment for text | |
related to | 0001648 | closed | fschmid | Ability to get the line count in a text frame |
parent of | 0001406 | confirmed | Add text metrics to scripter | |
related to | 0002708 | closed | cezaryece | Autosizing of frames |
Not all the children of this issue are yet resolved or closed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-06-06 09:20 |
|
New Issue | |
2005-06-06 09:20 |
|
Relationship added | parent of 0001406 |
2005-06-06 09:20 |
|
Status | new => acknowledged |
2005-06-23 07:26 |
|
Relationship added | related to 0001405 |
2005-06-23 07:26 |
|
Relationship added | related to 0001648 |
2005-07-03 14:03 | avox | Status | acknowledged => assigned |
2005-07-03 14:03 | avox | Assigned To | => avox |
2005-10-11 16:33 |
|
Relationship added | related to 0002708 |