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.
Parameter | Description |
---|---|
text_doc |
Handle of the associated text document instance. |
power_doc | |
nr_of_chars |
See txTextMakeViaBuffer. |
buffer |
See txTextMakeViaBuffer. |
buffer_format |
See txTextMakeViaBuffer. |
unicode_flags |
See txTextMakeViaStream. |
area |
See txTextMakeViaStream. |
attribs | |
fontmap_sd |
See txTextMakeViaStream. |
flags |
See txTextMakeViaPowerDocAndStream.
See txTextMakeViaStream.
See How To Use D-Type Streams And Stream Macros.
See our notes regarding file based streams.
See the txMakeCachedFontmap function.
txTextMakeViaStream, txTextMakeViaPowerDoc