Add SetTabWidth to Setter (non-functional currently)
This commit is contained in:
parent
6e3e288628
commit
2aa1d355ec
@ -18,6 +18,7 @@ type TypeSetter struct {
|
||||
face font.Face
|
||||
width, height int
|
||||
wrap bool
|
||||
tabWidth int
|
||||
|
||||
minWidth fixed.Int26_6
|
||||
layoutBounds image.Rectangle
|
||||
@ -215,6 +216,14 @@ func (setter *TypeSetter) SetHeight (heignt int) {
|
||||
setter.height = heignt
|
||||
}
|
||||
|
||||
// SetTabWidth sets the distance between tab stops in em spaces.
|
||||
func (setter *TypeSetter) SetTabWidth (tabWidth int) {
|
||||
if setter.tabWidth == tabWidth { return }
|
||||
setter.layoutClean = false
|
||||
setter.alignClean = false
|
||||
setter.tabWidth = tabWidth
|
||||
}
|
||||
|
||||
// Em returns the width of one emspace according to the typesetter's font, which
|
||||
// is the width of the capital letter 'M'.
|
||||
func (setter *TypeSetter) Em () (width fixed.Int26_6) {
|
||||
|
Loading…
Reference in New Issue
Block a user