go-hep.org/x/hep@v0.38.1/hplot/vgop/fonts.go (about)

     1  // Copyright ©2023 The go-hep Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package vgop // import "go-hep.org/x/hep/hplot/vgop"
     6  
     7  import (
     8  	xfnt "golang.org/x/image/font"
     9  	"gonum.org/v1/plot/font"
    10  	"gonum.org/v1/plot/vg"
    11  )
    12  
    13  type fontCtx struct {
    14  	fonts map[fontID]font.Face
    15  }
    16  
    17  type fontID struct {
    18  	Typeface font.Typeface `json:"typeface,omitempty"`
    19  	Variant  font.Variant  `json:"variant,omitempty"`
    20  	Style    xfnt.Style    `json:"style,omitempty"`
    21  	Weight   xfnt.Weight   `json:"weight,omitempty"`
    22  	Size     vg.Length     `json:"size,omitempty"`
    23  }