Skip to content

Commit

Permalink
chore: do a little code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
haashemi committed Mar 13, 2024
1 parent 37c4b43 commit a61fed2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ package writer

import "golang.org/x/text/unicode/bidi"

// DefaultOptions contains the recommended default options
var DefaultOptions = Options{
Bidi: true,
Features: DefaultFeatures,
}

// Options holds the features used to modify, shape, and write the text.
type Options struct {
Bidi bool
Features []Feature // Feature are the OpenType feature you want to enable.
// TODO: Features maybe should be a struct instead of a slice?
}

// bidiText converts a bi-directional text logically to visually.
func bidiText(in string) (out string, err error) {
p := bidi.Paragraph{}
p.SetString(in)
Expand Down

0 comments on commit a61fed2

Please sign in to comment.