Fonts
LCARdS includes a set of LCARS fonts, and you can add your own in LCARdS Config > Fonts without copying files or writing YAML. Antonio is the default LCARS font. A card uses another one through font_family.
- LCARdS only includes fonts whose license it can confirm from the original author: the SIL Open Font License, or the author's own terms in the font file.
- Fonts marked (BYOF) in the card editors are "bring your own font": not included, but their names still work. Until you give one a file it shows in Antonio.
- Every LCARdS font works on every Home Assistant page, without internet, including in other cards and themes.
Try it
Open LCARdS Config > Fonts (/lcards-config?tab=fonts) and drop a font file on it. It shows up under Your fonts, ready to pick in any card editor.
Using a Font
Set font_family on a text field, or in text.default for the whole card, to a font's key. The keys are in the tables below and in the Fonts tab; the font picker in the card editors lists them all, your own fonts under My fonts.
- A key works like any CSS font family, so a stack such as
"lcards_michroma, Antonio"falls back in order. - The other text keys (size, weight, case, spacing) are on Fonts, Colour and Backgrounds.
type: custom:lcards-button
preset: lozenge
text:
default:
color: var(--lcars-black)
title:
content: Shuttle bay
position: top-left
font_family: lcards_michroma
font_size: 16
sub:
content: Doors sealed
position: bottom-left
font_family: lcards_borg
font_size: 16
grid_options:
rows: 2Adding Your Own Fonts
Drop a font file on LCARdS Config > Fonts and it becomes a font you can use, named after the font in the file. LCARdS gives it a key of its own, such as lcards_user_ubuntu_mono, which you pick in the card editors or copy into YAML.
- Add a font's other weights the same way: Ubuntu Mono Bold joins Ubuntu Mono, and cards with
font_weight: bolduse it. A file of the same weight as one the font already has becomes a font of its own instead of replacing it. - TTF, OTF, WOFF and WOFF2 files work, up to 10 MB each. A TTF or OTF also works in the LCARdS Voice Skin and other Android apps; WOFF and WOFF2 work in browsers only. Font collections (
.ttc) aren't supported: add the single font files. - The key is made once from the name and stays the same when you rename the font, so your YAML keeps working.
- Changes reach every open dashboard within seconds, with no reload. Administrators add and change fonts; everyone else sees the tab read-only.
This example uses a font added in the Fonts tab, so it can't run here: the docs site has no fonts of yours.
type: custom:lcards-button
preset: lozenge
text:
title:
content: Engineering
show: true
font_family: lcards_user_ubuntu_monoMore about your own fonts
- The files: they go in
/config/www/lcards/fonts/, which LCARdS creates when it starts and updates never touch. A full Home Assistant backup includes them. - Files section: Files in your fonts folder, at the bottom of the tab, lists every file with the font that uses it. A file that belongs to no font has Make a font; Delete asks first and names the fonts that use the file.
- A file named after a bring-your-own key (
lcards_swiss_911.otf) is that font as soon as it arrives. - The media browser: the folder also shows under Media > LCARdS > My fonts.
Bring Your Own Fonts
The bring-your-own fonts are LCARS fonts LCARdS can't include: give one a file and every card using its key draws it. Until then those cards show Antonio.
- Let one of your fonts stand in: on its card under Your fonts, add bring-your-own fonts to Stands in for. One font can stand in for several, and it stays your font; Clear in the checklist removes only the link.
- Or give it a file of its own: upload a file named after the key (
lcards_handel_gothic.otf), or copy one into/config/www/lcards/fonts/with the File editor or Studio Code Server add-on, or a Samba share, the same way as your own 3D models. - The Bring your own fonts checklist in the Fonts tab shows which are set and which font each uses.
- A file copied in by hand appears after a browser refresh (Ctrl+Shift+R on a computer; on a wall tablet, reload the dashboard or clear the app's cache). Fonts added in the tab need no refresh.
| Font | Key | Shows until you add it |
|---|---|---|
| Changeling | lcards_changeling | Antonio |
| Context Ultra Condensed | lcards_context_ultra_condensed | Antonio |
| Crillee | lcards_crillee | Antonio |
| Eurostile | lcards_eurostile | Antonio |
| Eurostile Oblique | lcards_eurostile_oblique | Antonio |
| Fabrini | lcards_fabrini | Antonio |
| Federation | lcards_federation | Antonio |
| Galaxy | lcards_galaxy | Antonio |
| Handel Gothic | lcards_handel_gothic | Antonio |
| Jeffries | lcards_jeffries | Antonio |
| Klingon | lcards_klingon | Antonio |
| Microgramma | lcards_microgramma | Antonio |
| Microgramma Regular | lcards_microgramma_regular | Antonio |
| Millennium Extended Bold | lcards_millenium_extended_bold | Antonio |
| Romulan | lcards_romulan | Antonio |
| Sonic | lcards_sonic | Antonio |
| Square 721 | lcards_sqaure_721 | Antonio |
| Stellar | lcards_stellar | Antonio |
| Swiss 911 | lcards_swiss_911 | Antonio |
| Tholian | lcards_tholian | Antonio |
| Tungsten | lcards_tungsten | Antonio |
More about bring your own fonts
- Bold: until a font has its file,
font_weight: boldgives Antonio Bold. - Size: a font shows at its own size. Some symbol fonts draw small; set its Size in the Fonts tab, or raise
font_sizeorfont_size_percenton those cards. - Several files named after the key: LCARdS uses the first it finds of
.woff2,.otfand.ttf. - Adding a font to LCARdS: a font can be included when its author publishes a license that allows sharing it, such as the SIL Open Font License. Open an issue with a link to the author's own download page.
Size, Spacing and Other Names
Each of your fonts has a Size and spacing block and an "Also available as" field in the Fonts tab. Use them when a font draws too small or sits too high beside Antonio, or when a theme or another card asks for the font by its own name.
- The preview on the font's card shows it above Antonio at the same size, with each line's box shaded, so you can match them by eye. Reset goes back to the font's own values.
- The values apply everywhere the font draws, including the bring-your-own fonts it stands in for.
- Also available as gives the font other family names, separated by commas, such as
Tungsten. A name can't start withlcards_, be a CSS keyword such asserif, or be the name of a font LCARdS includes.
| Setting | Range | What it does |
|---|---|---|
| Size | 50 to 200 % | Scales the font, so it matches Antonio at the same font size |
| Ascent | 0 to 150 % | Space above the baseline, as a share of the font size |
| Descent | 0 to 150 % | Space below the baseline, as a share of the font size |
| Line gap | 0 to 150 % | Extra space between lines |
HA-LCARS Fonts
The HA-LCARS theme draws Home Assistant in Tungsten when it's there, else Antonio, and LCARdS covers both. You no longer need a dashboard resource for either.
- Antonio comes with LCARdS and is on every page, so HA-LCARS's Antonio works without the Google Fonts resource its guide describes.
- Tungsten: press Add Tungsten at the top of the Fonts tab and choose your Tungsten Medium and Bold files. LCARdS sets them up with HA-LCARS's own weights and size, under the name
Tungstenthe theme asks for, and the theme uses it on every page. - A setup made by hand (a Google Fonts resource for Antonio, or HA-LCARS's
tungsten.csswith its files inwww/community/fonts/) keeps working. The Fonts tab points out those resources; once Tungsten is added there you can remove them under Settings > Dashboards > Resources.
Using LCARdS Fonts Elsewhere in Home Assistant
Every LCARdS font name works anywhere in Home Assistant: other cards, theme variables and UIX styles. LCARdS declares all its fonts and yours on every page when it starts; a font file only downloads when something uses it.
- Use the key as the family name, such as
lcards_michroma, or one of your fonts' other names. - No UIX or theme changes are needed, and HA-LCARS's own font settings keep working.
This example styles a stock markdown card with UIX, so it can't run here: the docs demos draw LCARdS cards only.
type: markdown
content: "## Main Engineering"
uix:
style: |
ha-card {
font-family: lcards_michroma, Antonio, sans-serif;
}Included Fonts
These fonts ship with LCARdS, with their licenses. The license texts and the notices copied from the font files are in custom_components/lcards/fonts/LICENSES/, and the Credits page lists them too.
- The alien scripts draw their symbols on the ordinary letters: type
ABCand you see three symbols. - The two Ferengi fonts are one script, written left or right; pick the one that reads the way you want.
- The Fonts tab lists them under Included fonts, each with a sample and a Copy button for its key.
| Font | Key | Group | Author | License |
|---|---|---|---|---|
| Antonio | Antonio | Core | The Antonio Project Authors | SIL Open Font License 1.1 |
| Michroma | lcards_michroma | Standard | The Michroma Project Authors | SIL Open Font License 1.1 |
| Trek Arrow Caps | lcards_trekarrowcaps | Standard | Neale Davidson (Pixel Sagas) | SIL Open Font License 1.1 |
| Bajoran Ancient | lcards_bajoran_ancient | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Bajoran Ideogram | lcards_bajoran_ideogram | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Binar | lcards_binar | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Borg | lcards_borg | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Cardassian | lcards_cardassian | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Dominion | lcards_dominion | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Ferengi (Left) | lcards_ferengi_left | Alien | not named in the file | Charityware (notice in the font) |
| Ferengi (Right) | lcards_ferengi_right | Alien | not named in the file | Charityware (notice in the font) |
| Tellarite | lcards_tellarite | Alien | Neale Davidson (Pixel Sagas) | SIL Open Font License 1.1 |
| Trill | lcards_trill | Alien | "Tommy of Escondido" | Charityware (notice in the font) |
| Vulcan | lcards_vulcan | Alien | "Tommy of Escondido" | Charityware (notice in the font) |