API referenceReporting

tblSetFontSize

tblSetFont sets a cell's font name and style (genuinely

C
BOOL32 __stdcall tblSetFontA(ITBL Table, int32_t Row, int32_t Col, const char* Name, TFStyle Style, BOOL32 Embed, TCodepage CP);
BOOL32 __stdcall tblSetFontSelMode(ITBL Table, int32_t Row, int32_t Col, TFontSelMode Mode);
BOOL32 __stdcall tblSetFontSize(ITBL Table, int32_t Row, int32_t Col, float Value);
Delphi
function tblSetFontA(const Table: ITBL; Row, Col: Integer; const Name: PAnsiChar; Style: TFStyle; Embed: LongBool; CP: TCodepage): LongBool; stdcall;
function tblSetFontSelMode(const Table: ITBL; Row, Col: Integer; Mode: TFontSelMode): LongBool; stdcall;
function tblSetFontSize(const Table: ITBL; Row, Col: Integer; Value: Single): LongBool; stdcall;

Purpose. tblSetFont sets a cell's font name and style (genuinely per-cell). tblSetFontSelMode sets a cell's font-selection mode (genuinely per-cell). tblSetFontSize nominally sets a cell's font size — but is table-wide, not per-cell.

Description. tblSetFontA stores Name/Style into the cell's own FontName/FontStyle fields — genuinely per-cell, each cell can have a different font. tblSetFontA's Embed and CP (codepage) parameters are accepted by the ABI but not passed to SetCellFont at all — only Name and Style reach the real per-cell state; there is no per-cell embed-override or codepage selection despite both parameters existing. tblSetFontW's Name is subject to the chapter-wide Latin-1-truncation finding (Text, Images, Sub-Tables, Templates, Actions, and Borders) — a non-ASCII font name set via the W form will be corrupted. tblSetFontSelMode genuinely stores per-cell (TTableCell.FontSelMode). MAJOR — tblSetFontSize, despite accepting Row/Col in its ABI exactly like every other per-cell setter in this volume, writes a single TABLE-WIDE field (TLumasTable.FontSize) — Row/Col are accepted but never read at all. There is no per-cell font-size override anywhere in this API: every cell in a table always renders at the same one size, regardless of how many times tblSetFontSize is called with different Row/Col values — each call simply overwrites the same single table-wide value.

Parameters.

ParameterDescription
TableTarget table handle.
Row, Col*(Font/FontSelMode)* Genuinely per-cell. *(FontSize)* Accepted but ignored — the size is always table-wide.
Name, Style*(Font only)* Genuinely stored per-cell; W form Latin-1-truncated.
Embed, CP*(Font only)* Both accepted but dropped — no per-cell embed/codepage control.
Mode*(FontSelMode only)* Genuinely stored per-cell.
Value*(FontSize only)* The new table-wide font size.

Return value. True if Row/Col are in range (for tblSetFontSize, this check happens despite the value ultimately being table-wide — an out-of-range Row/Col still fails the call even though the successful path ignores them).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Reporting
Category

Misc

Exported names

tblSetFontSize

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.