Skip to content

Commit

Permalink
Removes references to MSDF
Browse files Browse the repository at this point in the history
  • Loading branch information
JujuAdams committed Mar 10, 2024
1 parent 11da1ba commit bc128af
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 122 deletions.
2 changes: 1 addition & 1 deletion 9.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ There are a multitude of very useful features available:
- Automatic [pagination](https://en.wikipedia.org/wiki/Pagination)
- High performance caching
- Font effect baking
- Resolution-independent [MSDF fonts](msdf-fonts)
- Resolution-independent SDF fonts
- Arabic and Hebrew support, and limited Thai and Hindi (Devanagari) support

## About & Support
Expand Down
1 change: 0 additions & 1 deletion 9.0/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- [Setting Up](setting-up)
- [Coming from Native GM](coming-from-native-gm)
- [Text Formatting](text-formatting)
- [MSDF Fonts](msdf-fonts)
- [Extended Language Support](extended-language-support)

---
Expand Down
4 changes: 2 additions & 2 deletions 9.0/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ This script holds a number of macros that customise the behaviour of Scribble. `
|`SCRIBBLE_INCREMENTAL_FREEZE` |`true` |Whether text models should freeze their vertex buffers one frame after the text model is created. This leads to increased performance, especially with large amounts of text |
|`SCRIBBLE_SPRITEFONT_IGNORE_ORIGIN` |`false` |Set to `true` to ignore a sprite origin's contribution to its spritefont glyph x/y offsets |
|`SCRIBBLE_SPRITEFONT_LEGACY_HEIGHT` |`false` |Version 8 uses GameMaker's native spritefont dimensions. Older versions used the tight bounding box leading to narrower lines. Set this macro to `true` to use the tighter legacy behaviour|
|`SCRIBBLE_MSDF_BORDER_TRIM` |`0` |Edge trimming around the bounding box for MSDF glyphs (in pixels). This is useful for tidying up any glitches when scaling |
|`SCRIBBLE_ALWAYS_DOUBLE_DRAW` |`false` |Whether to force double-draw behaviour. This is useful for fixing problems with MSDF glyph border overlap |
|`SCRIBBLE_SDF_BORDER_TRIM` |`0` |Edge trimming around the bounding box for SDF glyphs (in pixels). This is useful for tidying up any glitches when scaling |
|`SCRIBBLE_ALWAYS_DOUBLE_DRAW` |`false` |Whether to force double-draw behaviour. This is useful for fixing problems with SDF glyph border overlap |
|`SCRIBBLE_COMMAND_TAG_OPEN` |`ord("[")` |Character used to open a command tag. First 127 ASCII chars only |
|`SCRIBBLE_COMMAND_TAG_CLOSE` |`ord("]")` |Character used to close a command tag. First 127 ASCII chars only |
|`SCRIBBLE_COMMAND_TAG_ARGUMENT` |`ord(",")` |Character used to delimit a command parameter inside a command tag. First 127 ASCII chars only |
Expand Down
2 changes: 1 addition & 1 deletion 9.0/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Version 8 of Scribble primarily supports GameMaker LTS 2022, and in theory suppo

## What kinds of fonts can Scribble draw?

Anything that GameMaker natively supports as a font resource, including spritefonts. Scribble additionally supports [MSDF fonts](msdf-fonts) which are very useful for mobile games or any game which might have a wide variety of text sizes. Scribble unfortunately doesn't (yet) support fonts added via `font_add()`.
Anything that GameMaker natively supports as a font resource, including spritefonts. Scribble additionally supports SDF fonts which are very useful for mobile games or any game which might have a wide variety of text sizes. Scribble unfortunately doesn't (yet) support fonts added via `font_add()`.

 

Expand Down
2 changes: 1 addition & 1 deletion 9.0/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are a multitude of very useful features available:
- Automatic [pagination](https://en.wikipedia.org/wiki/Pagination)
- High performance caching
- Font effect baking
- Resolution-independent [MSDF fonts](msdf-fonts)
- Resolution-independent SDF fonts

Scribble supports all GameMaker export modules, including consoles, Opera GX, and HTML5.

Expand Down
2 changes: 1 addition & 1 deletion 9.0/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,4 @@ Returns an array of arrays, the nested arrays being comprised of two elements. T
|`fontName`|string |Name of the font to modify, as a string |
|`state` |boolean |Whether the font should use bilinear filtering or not|

By default, standard fonts and spritefonts will use whatever texture filtering GPU state has been set. MSDF fonts default to forcing bilinear filtering when they are drawn. `scribble_font_force_bilinear_filtering()` allows you to override this behaviour if you wish, forcing all glyphs for a given font to be drawn with the specified bilinear filtering state. Setting the `state` argument to `undefined` will cause glyphs for the font to inherit whatever GPU state has been set (the default behaviour for standard fonts and spritefonts).
By default, standard fonts and spritefonts will use whatever texture filtering GPU state has been set. SDF fonts default to forcing bilinear filtering when they are drawn. `scribble_font_force_bilinear_filtering()` allows you to override this behaviour if you wish, forcing all glyphs for a given font to be drawn with the specified bilinear filtering state. Setting the `state` argument to `undefined` will cause glyphs for the font to inherit whatever GPU state has been set (the default behaviour for standard fonts and spritefonts).
14 changes: 1 addition & 13 deletions 9.0/misc-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,4 @@ Frees all memory that Scribble text elements and text models are currently using
|----|--------|-------|
|None| | |

Forces every Scribble text element to refresh their text model. This may be useful if some global property has changed, such as a change in default font or a macro has changed.

 

## `scribble_msdf_thickness_offset(offset)`

**Returns:** N/A (`undefined`)

|Name |Datatype|Purpose |
|--------|--------|--------------------------------------------------------------------------------|
|`offset`|number |The global MSDF font thickness offset to apply. The default offset values is `0`|

Applies a global thickness adjustment to MSDF fonts. An offset less than `0` will make MSDF glyphs thinner, an offset greater than `0` will make MSDF glyphs thicker. The offset value is very sensitive and values of `+/- 0.01` may make a significant difference to the appearance of glyphs.
Forces every Scribble text element to refresh their text model. This may be useful if some global property has changed, such as a change in default font or a macro has changed.
95 changes: 0 additions & 95 deletions 9.0/msdf-fonts.md

This file was deleted.

6 changes: 1 addition & 5 deletions 9.0/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,4 @@ Alternatively, if you want to simplify some of your existing text drawing that y

## How do I use spritefonts?

Spritefonts work similarly to standard fonts and they are interchangeable when drawing text. They do, however, require that you use [`font_add_sprite`](https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_add_sprite.htm) or [`font_add_sprite_ext`](https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_add_sprite.htm) to define the spritefont before using them with Scribble. The name of the spritefont in Scribble is the same as the name of the sprite asset.

## How do I use MSDF fonts?

[MSDF fonts](msdf-fonts) are an alternate way to draw text in a way that improves how text looks when it's scaled. This not only reduces texture page usage but it's very helpful when drawing text on mobile devices. Scribble's implementation of MSDF fonts also supports borders and drop shadows. MSDF fonts are useful but relatively complex; please read the dedicated [MSDF font page](msdf-fonts) for more information.
Spritefonts work similarly to standard fonts and they are interchangeable when drawing text. They do, however, require that you use [`font_add_sprite`](https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_add_sprite.htm) or [`font_add_sprite_ext`](https://manual.yoyogames.com/GameMaker_Language/GML_Reference/Asset_Management/Fonts/font_add_sprite.htm) to define the spritefont before using them with Scribble. The name of the spritefont in Scribble is the same as the name of the sprite asset.
4 changes: 2 additions & 2 deletions 9.0/superfont-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Creates a new superfont. The new font is totally blank and should not be used un

Copies a set of glyphs from the source font into the target superfont. The target font must be a superfont created by `scribble_super_create()`, though the source font can be either a superfont or not. If `overwrite` is set to `false`, any glyphs that already exist in the target font will be ignored. If `overwrite` is set to `true` existing glyphs will be overwritten.

?> It is not possible to combine glyphs from an MSDF font and a standard/sprite font. It is further not possible to combine glyphs from MSDF fonts that have a different `pxrange`. Standard fonts and sprite fonts can otherwise be combined however you like.
?> It is not possible to combine glyphs from an SDF font and a standard/sprite font. It is further not possible to combine glyphs from SDF fonts that have a different spread values. Standard fonts and sprite fonts can otherwise be combined however you like.

`glyphSet` can be one of three different types of input. You may specify as many glyph sets as you like

Expand Down Expand Up @@ -62,7 +62,7 @@ scribble_super_glyph_copy("targetFont", "sourceFont", true, [40, 41], [88, 90]);
Copies **all** glyphs from the source font into the target superfont. The target font must be a superfont created by `scribble_super_create()`, though the source font can be either a superfont or not. If `overwrite` is set to `false`, any glyphs that already exist in the target font will be ignored. If `overwrite` is set to `true` existing glyphs will be overwritten.
?> It is not possible to combine glyphs from an MSDF font and a standard/sprite font. It is further not possible to combine glyphs from MSDF fonts that have a different `pxrange`. Standard fonts and sprite fonts can otherwise be combined however you like.
?> It is not possible to combine glyphs from an SDF font and a standard/sprite font. It is further not possible to combine glyphs from SDF fonts that have a different spread values. Standard fonts and sprite fonts can otherwise be combined however you like.
 
Expand Down

0 comments on commit bc128af

Please sign in to comment.