Index

C/C++ Functions

txTextMakeViaPowerDocAndBuffer

DT_SLONG txTextMakeViaPowerDocAndBuffer(DT_TXDOC text_doc, DT_PDDOC power_doc, DT_SLONG nr_of_chars, const DT_UBYTE* buffer, DT_ID_SWORD buffer_format, DT_SWORD unicode_flags, const DT_TX_TEXTFLOW_AREA* area, const DT_TX_DEFAULT_ATTRIBS* attribs, const DT_STREAM_DESC* fontmap_sd, DT_SWORD flags)

Short Description: Make text document - via PowerDoc and buffer

The txTextMakeViaPowerDocAndBuffer function embeds a Unicode text flow into an existing Power Engine document (i.e. a document created using D-Type Power Engine and its API functions) by reading a plain text file stored in a memory buffer. This function optionally performs Unicode's implicit bidirectional reordering algorithm (BiDi) and auto-detects Unicode scripts (such as Latin, Arabic, Thai etc.) so that complex scripts can be shaped properly.

This function must be called once per text document instance, and only after a successful call to txTextIni. Applications that wish to embed another Unicode text flow using this function must first destroy the existing text document instance by calling txTextExt and then create a new one by calling txTextIni.

Note: txTextMakeViaPowerDocAndBuffer is an advanced and specialized function. Its primary users are developers who wish to use D-Type Unicode Text Module to embed text flows into their D-Type Power Engine documents. In this use case scenario, the associated text document instance (text_doc) is usually short-lived while the Power Engine document (power_doc) is long-lived. With that in mind, the txTextMakeViaPowerDocAndBuffer function is rather different from, and should not be confused with txTextMakeViaStream, txTextMakeViaBuffer and txTextMakeViaPowerDoc.

Parameters

ParameterDescription

text_doc

Handle of the associated text document instance.

power_doc

See txTextMakeViaPowerDoc.

nr_of_chars

See txTextMakeViaBuffer.

buffer

See txTextMakeViaBuffer.

buffer_format

See txTextMakeViaBuffer.

unicode_flags

See txTextMakeViaStream.

area

See txTextMakeViaStream.

attribs

See txTextMakeViaPowerDocAndStream.

fontmap_sd

See txTextMakeViaStream.

flags

See txTextMakeViaPowerDocAndStream.

Return Value

See txTextMakeViaPowerDocAndStream.

Comments

See txTextMakeViaStream.

Note 1

See How To Use D-Type Streams And Stream Macros.

Note 2

See our notes regarding file based streams.

Note 3

See the txMakeCachedFontmap function.

Related Functions

txTextMakeViaStream, txTextMakeViaPowerDoc

 

Index