[Bf-committers] Slightly improved text objects, potential inclusion in BF

Alexander Ewering blender at instinctive.de
Fri Jun 17 02:32:33 CEST 2005


during the development of DTPBlender (a fork of instinctive-blender
intended for DTP - 2D layouts, design, etc.), I heavily modified the
Blender 3d text object, and added quite a few features which are
otherwise only found in top-notch DTP applications.

Best of all: It should still be pretty compatible with BF, and porting
it should be possible with a couple of hours of time, which I hope to
find one of these days, if there is enough interest in the features.

I know not many people use Blender for 2D work (poor souls! :), but
also for other tasks, like titles, etc., it should be a nice

Here's the docs with screenshots, any comments welcome. I'll try
to port it to BF soon.


New Features / Changes shortlist

  * Support for Plain/Bold/Italic/Bold-Italic typefaces, switchable per
    character. For each combination, a seperate font file can be loaded.

    => http://blender.instinctive.de/docs/img/bi.png

  * Support for material indices per character

    => http://blender.instinctive.de/docs/img/matind.png

  * Manual kerning per character

    => http://blender.instinctive.de/docs/img/kern.png

  * Adjustable word spacing

  * Arbitrary number of freely positionable and resizable text frames
    per text object, with continuous text flow between them

    => http://blender.instinctive.de/docs/img/tb.png

    => http://blender.instinctive.de/docs/img/tb8.png
       (All text on the page is a single text object)

  * Automatic wordwrap at the border of a text frame

  * "Flush" (Justify) text can have a hard line break anywhere (lines
    only flush if they end because of word wrapping, and break hard
    when you press Enter)

  * Selection (shift-move) and cut/copy/paste of textblocks

    => http://blender.instinctive.de/docs/img/sel.png

  * Overlapping characters have no filling errors

    => http://blender.instinctive.de/docs/img/olap.png

  * "Lorem" button for inserting a random paragraph of Lorem Ipsum at
    the text cursor

  * "Insert text" button for directly loading a text file at the cursor's

  * Increased maximum text size from 1000 to 50000 characters

  * Increased curve filling speed by a factor of about 10 for smaller
    texts, and 100 and beyond for larger texts, thus:

  * Due to the faster filling, Text objects are now always filled inside
    editmode, except if turned off with "Fast Edit".

  * CTRL-Left/Right goes to next/previous word

  * More standard HOME/END keys for going to beginning/end of current
    line (used to be shift-left/right)

  * Support for PageUp/PageDown for going back/forward 10 lines at a time

  * More complex font files supported, which formerly used to crash Blender

Bold/Italic/Plain text

The "B" and "i" togglebuttons toggle bold and italic. For specifying what
fonts to use for each combination, just set the desired combination, and
then load the appropriate font file. Keep switching until all 4 possible
font files are specified.

Inside editmode, use the "B" and "i" buttons to switch 1) either the
selected block of text or, if nothing is selected, 2) the mode for 
new characters entered.

Shortcuts: CTRL-B / CTRL-I

Material indices

Just switch to the desired material index in the usual editbuttons, and
start typing using that Material index. For switching an entire block,
select a block, then switch to the desired material index.

The "Select", "Deselect", and "Assign" buttons have no effect.

Manual kerning

Between any pair of characters, press ALT-Left / ALT-Right to decrease/
increase kerning by steps of 0.1 (IIRC).

Adjustable word spacing

New button "Word spacing" specifies a factor by which whitespace gets
scaled in width.

Text frames

A new text object always has one initial text frame, with offset and
width/height set to 0.

Frames with width set to 0 are ignored completely (no wordwrap happens),
frames with height set to 0 flow forever (no switch to the next

Creating/Deleting/Choosing textframes works exactly like material

To create a new textframe, press the "Insert" button, which will insert
a new textframe after the current one, with the same coordinates and
dimensions. You will need to move it (X:/Y: buttons) to see it.

The active textframe (choosable with the "1 TextFrame: 1" button) is
drawn in the active theme colour.

Text flows continuously from the lowest-numbered into the highest-numbered

"Delete" deletes the current text frame (but obviously, not the text
itself) and removes it from the flow.

Selection of text blocks

Selection works like in any usual word processor.

Pressing SHIFT while moving (Left/Right/Up/Down/PageUp/PageDown/
CTRL-Left/Right) selects text (this should be mousified some day).

Moving the cursor without SHIFT will clear the selection. Entering
characters or performing other actions with selected text will erase

CTRL-C copies the text into a buffer, CTRL-V pastes the buffer (including
all formatting information) at current cursor position. CTRL-X cuts
and copies into the buffer.

Selections are remembered over exiting editmode.

Insert Text at cursor

After the many unsuccessful attempts to provide a sane way to load bigger
blocks of text into a text object, I've created a simple "Insert Text"
button which pops up a fileselector and inserts the chosen file's contents
at the cursor position. Can't get much simpler.

"Lorem" button

As its name implies, this button will insert a random paragraph (a few
sentences) of "Lorem Ipsum" at the cursor position. Rinse and repeat
up to the desired text length.

Filled curves and "Fast Edit"

Due to the vast speedup of font filling, it can now always be filled
inside editmode, giving a better preview. If you have a really large
text object and want to stay unfilled during editing, just activate
"Fast Edit" (which only can be toggled OUTSIDE editmode).

| alexander ewering              instinctive mediaworks
| ae[@]instinctive[.]de   http://www[.]instinctive[.]de

More information about the Bf-committers mailing list