// The rules package of PrintDraftFast provides the tools around configuration of how a draft should look. The default should work but can be adjusted for a personal touch.. package rules type Format struct { Right float64 Left float64 Font string Style string Size float64 Hide bool Align string Prefix string Postfix string } type Set map[string]Format func (s Set) Get(style string) (f Format) { f, ok := s[style] if !ok { f = s["default"] f.Hide = true } if f.Font == "" { f.Font = "CourierPrime" } if f.Size == 0 { f.Size = 12 } if f.Align == "" { f.Align = "L" } return f } var Default = Set{ "default": { Left: 1.5, Right: 1, }, "h1": { Size: 2, }, "center": { Left: 1.5, Right: 1, Align: "C", }, }