Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
[SDK] Add more font types (#537)
Browse files Browse the repository at this point in the history
* Add more font types

* Change the default font
  • Loading branch information
stevenvergenz authored Apr 28, 2020
1 parent 622ce51 commit 92d39b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/sdk/src/actor/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ export enum TextJustify {
Right = 'right',
}

/** Available text font types. If a type is unsupported by the MRE client, [[Default]] will be used. */
export enum TextFontFamily {
/** The default engine font */
Default = 'default',
/** A font with serif strokes */
Serif = 'serif',
/** A font without serif strokes */
SansSerif = 'sans-serif',
/** A font where all characters are the same width */
Monospace = 'monospace',
/** A handwritten font */
Cursive = 'cursive'
}

export interface TextLike {
Expand Down Expand Up @@ -69,7 +78,7 @@ export class Text implements TextLike {
/**
* The font family to use to draw the text
*/
public font: TextFontFamily = TextFontFamily.SansSerif;
public font: TextFontFamily = TextFontFamily.Default;
/**
* The text's color
*/
Expand Down

0 comments on commit 92d39b3

Please sign in to comment.