fontlab.fgSymbolList · declarations 001
append
append(fgSymbolList: Any) -> Any
append(fgSymbol | fgSymbolList)
Appends a single symbol or an entire list to the end.
Source: FontLab Proteus API documentation
assign
assign(*args: Any, **kwargs: Any) -> Any
assign(fgFont, list(glyphsId))
Assigns symbols from a list of glyph IDs within fgFont.
Source: FontLab Proteus API documentation
at
at(index: Any) -> fgSymbol
fgSymbol at(index)
Returns the symbol at index. Does not remove it.
Source: FontLab Proteus API documentation
clear
clear() -> Any
clear()
Removes all symbols. The list becomes empty after this call.
Source: FontLab Proteus API documentation
clearData
clearData(dataCode: int) -> Any
clearData(int dataCode)
Removes the custom data entry with dataCode from every symbol in the list.
Source: FontLab Proteus API documentation
clearString
clearString() -> Any
clearString()
Clears the cached string representation (forces recomputation the next time string() is called). Only needed if you have modified symbols directly and want to ensure string() gives a fresh result.
Source: FontLab Proteus API documentation
compare
compare(arg0: fgSymbolList) -> bool
bool compare(fgSymbolList)
Returns True if both lists have the same symbols by ID (structural equality, not deep value equality).
Source: FontLab Proteus API documentation
computeString
computeString(advancedProcessing: bool) -> Any
computeString(bool advancedProcessing)
Rebuilds the string representation of this list. If advancedProcessing is True, applies OpenType feature substitutions, which may change the glyph count (e.g. two symbols → one ligature glyph).
Source: FontLab Proteus API documentation
data
data(index: int, v: Any = ...) -> Any
QVariant data(int index, int dataCode[, QVariant v = QVariant()])
Returns the custom data at dataCode for symbol index. If v is given, it is returned as the default when no data is found — like Python's dict.get(key, default).
Source: FontLab Proteus API documentation
empty
empty() -> bool
bool empty()
Returns True if the list has no symbols.
Source: FontLab Proteus API documentation
equals
equals(arg0: fgSymbolList) -> bool
bool equals(fgSymbolList)
Returns True if both lists are identical — same length and same content.
Source: FontLab Proteus API documentation
insert
insert(index: Any, arg1: fgSymbol) -> Any
insert(index, fgSymbol)
Inserts a single symbol at index. All subsequent symbols shift right.
Source: FontLab Proteus API documentation
last
last() -> fgSymbol
fgSymbol last()
Returns the last symbol in the list without removing it.
Source: FontLab Proteus API documentation
limitLineLength
limitLineLength(len: int) -> bool
bool limitLineLength(int len)
Truncates the list to at most len symbols. Returns True if truncation actually happened (the list was longer than len).
Source: FontLab Proteus API documentation
mid
mid(count: Any = ...) -> fgSymbolList
fgSymbolList mid(int index[, int count=-1])
Returns a new sub-list starting at index. If count is given, takes up to count symbols; otherwise takes all remaining. Python's equivalent of lst[index:index+count].
Source: FontLab Proteus API documentation
remove
remove(index: Any, count: Any) -> Any
remove(index, count)
Removes count symbols starting at position index.
Source: FontLab Proteus API documentation
replace
replace(index: Any, count: Any, arg2: fgSymbolList) -> Any
replace(index, count, fgSymbolList)
Replaces count symbols starting at index with the contents of fgSymbolList. This is the list equivalent of Python's str.replace — use it to substitute a subsequence.
Source: FontLab Proteus API documentation
reserve
reserve(count: int) -> Any
reserve(int count)
Pre-allocates memory for count symbols. Call before a large batch of append() calls to avoid repeated memory reallocations.
Source: FontLab Proteus API documentation
restore
restore(*args: Any, **kwargs: Any) -> Any
bool restore(QByteArray, list(fgFont))
Deserialises a symbol list from a binary blob previously created with store(). The list of fonts is needed to resolve glyph IDs. Returns True on success.
Source: FontLab Proteus API documentation
set
set(index: Any, arg1: fgSymbol) -> Any
set(index, fgSymbol)
Replaces the symbol at index with the given fgSymbol.
Source: FontLab Proteus API documentation
setData
setData(index: Any, DataCode: Any, arg2: Any) -> Any
setData(index, DataCode, QVariant)
Sets custom data for the symbol at index.
Source: FontLab Proteus API documentation
setGlyphsList
setGlyphsList(*args: Any, **kwargs: Any) -> Any
setGlyphsList(list(fgGlyph), fgFont)
Replaces the list by creating one symbol per glyph in the provided glyph list, all resolved within fgFont.
Source: FontLab Proteus API documentation
setIdList
setIdList(*args: Any, **kwargs: Any) -> Any
setIdList(list(id), fgFont)
Replaces the list using a list of glyph IDs. Each ID is resolved within fgFont.
Source: FontLab Proteus API documentation
setList
setList(list: fgSymbols) -> Any
setList(fgSymbols list)
Replaces the entire list content with a pre-built list of fgSymbol objects.
Source: FontLab Proteus API documentation
setNamesList
setNamesList(QStringList: Any) -> Any
setNamesList(string | QStringList)
Builds the symbol list from a space-separated glyph name string or a Python list of glyph name strings. Example: sl.setNamesList("A B uni00E9 C") or sl.setNamesList(["A", "B", "C"]).
Source: FontLab Proteus API documentation
setSterile
setSterile() -> Any
setSterile()
Marks every symbol in the list as sterile — useful for text that should be processed by the shaping engine for measurement but not visually rendered.
Source: FontLab Proteus API documentation
setString
setString(advancedProcessing: Any = ...) -> Any
setString(string[, bool advancedProcessing = true])
Parses a standard Unicode text string and populates the list. If advancedProcessing is True, handles ligature clusters and multi-codepoint sequences correctly. This is the easiest way to populate an fgSymbolList.
Source: FontLab Proteus API documentation
setUnicodeList
setUnicodeList(*args: Any, **kwargs: Any) -> Any
setUnicodeList( list(unicodes) )
Builds the symbol list from a Python list of Unicode code points. Example: sl.setUnicodeList([0x0041, 0x0042, 0x0043]) builds "A", "B", "C".
Source: FontLab Proteus API documentation
size
size() -> int
int size()
Returns the number of symbols.
Source: FontLab Proteus API documentation
store
store(packageID: Any) -> bytes
QByteArray store(packageID)
Serialises the entire symbol list to a binary blob tied to a specific font (identified by packageID). Use for clipboard or undo snapshot operations.
Source: FontLab Proteus API documentation
string
string(advancedProcessing: bool) -> str
QString string(bool advancedProcessing)
Returns the text as a Python string. If advancedProcessing is True, OpenType features are applied before converting. Pass False for the raw character sequence.
Source: FontLab Proteus API documentation
symbols
symbols() -> Any
list(fgSymbol) symbols()