Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FwPrinterFont

FwPrinterFont():GetFromName(cFontName) --> cFont

Gets font codes for printer.exe.

FwPrinterFontAdvPL
01 · OVERVIEW

Overview

Methods are static and need no instance. GetFromName maps names to codes with Courier New fallback. Calibri is documented for XLSX rather than all print output. The class requires LIB 20201009+. This example gets the Arial code without dialog or printing. Some syntax lines contain inconsistent names; this subset uses explicitly documented GetFromName. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FwPrinterFont():GetFromName(cFontName) --> cFont

Parameters

cFontName
CharacterRequired

Font name, such as Arial.

Methods

GetFromNameMaps a name with Courier New fallback.FwPrinterFont():GetFromName(cFontName) --> cFont
ArialRetrieves the Arial code.FwPrinterFont():Arial() --> cFont
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed445()
    // Static method: do not construct an object with New.
    ConOut(FwPrinterFont():GetFromName("Arial"))
Return Nil
Expected result

Expected Arial text code: 01. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check LIB version, lifecycle and context before integration. These methods are a documented subset rather than the complete API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FwPrinterFont. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha