Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > ConstantProvider > setFontConstants_
blockRendering.ConstantProvider.setFontConstants_() method
Set constants related to fonts.
Signature:
protected setFontConstants_(theme: Theme): void;
Parameters
Parameter |
Type |
Description |
theme |
Theme |
The current workspace theme. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `setFontConstants_` method is used to configure font-related settings within the Blockly block rendering engine."],["It takes a `Theme` object as input, which provides the necessary font information for the current workspace."],["This method is designated as `protected`, indicating it's primarily for internal use within the `ConstantProvider` class."],["By setting font constants based on the theme, it ensures consistent visual styling for blocks across different workspaces."]]],["The `setFontConstants_()` method within the `ConstantProvider` class sets font-related constants. It is a protected method that accepts a `Theme` object as its sole parameter. This `theme` parameter represents the current workspace theme and is used to define the font constants. The method does not return any value.\n"]]