Commit Graph

8 Commits

Author SHA1 Message Date
Elias Naur f3f079df32 font/opentype: treat invalid characters less specially
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-20 20:15:31 +01:00
Elias Naur c072a7eb87 font/opentype: fix kerning
Fixes gio#69

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-20 19:57:38 +01:00
Elias Naur 682d2810d3 text: remove SingleLine from LayoutOptions
Low level text layout should not deal with filtering newlines.

Updates gio#61

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 20:01:40 +01:00
Elias Naur e864ac3fc3 op/clip: split clip operations into its own package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 19:07:00 +01:00
Elias Naur 143d2aae95 font/gofont: add explicit Register
Registering the font as a side effect of importing the gofont package
was too magic. Require an explicit Register call instead. As a side
effect, it is more clear which font is the default (the first one
registered).

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-23 10:18:11 +02:00
Elias Naur 445d85efe0 font/gofont: add Go font convenience package
To use the Go font in a Gio program, import it:

import _ "gioui.org/font/gofont"

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-13 18:23:30 +02:00
Elias Naur edf0d8ef99 font/opentype,text/opentype: move package
Opentype parsing, layout and shaping will be used by subpackages to package
font. Move the opentype package accordingly.

Remove the Must helper function; programs will no longer use the opentype
package in the normal case.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-13 18:23:30 +02:00
Elias Naur 40822ef26b font: add a central font registry
Package font holds a singleton text.Shaper for general use. Subpackages
call Register to add fonts to the registry.

The intention is that programs can add a typeface by importing a package:

import _ "gioui.org/font/gofont"

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-13 18:23:30 +02:00