Skip to content
ExamplesOpen editor ↗

mokgwaWaMokwalo

→ textStyle()

Chooses the text style: `TLWAELO`, `ITHALIKI`, `TIISA` or `TIISAITHALIKI`.

mokgwaWaMokwalo(style) | mokgwaWaMokwalo()

The default style is TLWAELO. TIISA makes the letters heavier, ITHALIKI slants them, and TIISAITHALIKI does both.

It works on system fonts only — the ones mofutatlhaka names, such as 'Georgia'. Fonts loaded with loadFont are unaffected, and the page’s CSS can override what you set here.

One word, two jobs. Lower-case tlwaelo is the name of default inside tlhopha — the branch taken when nothing else matches. Upper-case TLWAELO is the ordinary, unremarkable text style. It is the same word in both sentences: “the usual one”. Bopa tells them apart by capitals, as it does for every value name.

NameTypeDescription
mokgwa (optional)seeloTLWAELO, ITHALIKI, TIISA or TIISAITHALIKI.
The four styles in a row
tiro setaLoeto() {
  thalaKanefase(400, 260);
  bokamorago(242);
  tlogelaMothalo();
  tlatsaMmala(30, 40, 60);
  bogoloJwaMokwalo(26);

  mokgwaWaMokwalo(TLWAELO);
  thalaMokwalo('Tlwaelo', 40, 60);

  mokgwaWaMokwalo(TIISA);
  thalaMokwalo('Tiisa', 40, 115);

  mokgwaWaMokwalo(ITHALIKI);
  thalaMokwalo('Ithaliki', 40, 170);

  mokgwaWaMokwalo(TIISAITHALIKI);
  thalaMokwalo('Tiisa Ithaliki', 40, 225);

  tlhalosa('Mela e mene ya mokwalo, nngwe le nngwe e bontsha mokgwa o mongwe: tlwaelo, tiisa, ithaliki le tse pedi mmogo.');
}

thalaMokwalo, mofutatlhaka, TLWAELO, TIISA, ITHALIKI, TIISAITHALIKI