// See cairo_set_font_size().
//
// C API documentation: http://cairographics.org/manual/cairo-text.html#cairo-set-font-size
359440
func (cr *Context) SetFontSize(size float64) {
	C.cairo_set_font_size(cr.Ptr, C.double(size))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
484915
func (options *FontOptions) Hash() uint32 {
	ret := uint32(C.cairo_font_options_hash(options.Ptr))
	if err := options.status(); err != nil {
		panic(err)
	}
	return ret
}
1127556
func setLangNumFmt(style *xlsxStyleSheet, formatStyle *formatStyle) int {
	numFmts, ok := langNumFmt[formatStyle.Lang]
	if !ok {
		return 0
	}
	var fc string
	fc, ok = numFmts[formatStyle.NumFmt]
	if !ok {
		return 0
	}
	nf := xlsxNumFmt{FormatCode: fc}
	if style.NumFmts != nil {
		nf.NumFmtID = style.NumFmts.NumFmt[len(style.NumFmts.NumFmt)-1].NumFmtID + 1
		style.NumFmts.NumFmt = append(style.NumFmts.NumFmt, &nf)
		style.NumFmts.Count++
	} else {
		nf.NumFmtID = formatStyle.NumFmt
		numFmts := xlsxNumFmts{
			NumFmt: []*xlsxNumFmt{&nf},
			Count:  1,
		}
		style.NumFmts = &numFmts
	}
	return nf.NumFmtID
}
727715
func (c *Captcha) SetFont(paths ...string) error {
	for _, v := range paths {
		if erro := c.AddFont(v); erro != nil {
			return erro
		}
	}
	return nil
}
943589
func (f *Fpdf) SetFontStyle(styleStr string) {
	f.SetFont(f.fontFamily, styleStr, f.fontSizePt)
}
1274672
func (s *BurninDestinationSettings) SetFontSize(v int64) *BurninDestinationSettings {
	s.FontSize = &v
	return s
}
951107
func (s *BurninDestinationSettings) SetFontColor(v string) *BurninDestinationSettings {
	s.FontColor = &v
	return s
}
359730
func (scaledFont *ScaledFont) TextExtents(utf8 string, extents *TextExtents) {
	c_utf8 := C.CString(utf8)
	defer C.free(unsafe.Pointer(c_utf8))
	C.cairo_scaled_font_text_extents(scaledFont.Ptr, c_utf8, (*C.cairo_text_extents_t)(unsafe.Pointer(extents)))
	if err := scaledFont.status(); err != nil {
		panic(err)
	}
}
1262059
func (options *FontOptions) GetHintStyle() HintStyle {
	ret := HintStyle(C.cairo_font_options_get_hint_style(options.Ptr))
	if err := options.status(); err != nil {
		panic(err)
	}
	return ret
}
1349899
func (a *PrintToPDFArgs) SetPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFArgs {
	a.PreferCSSPageSize = &preferCSSPageSize
	return a
}
1349883
func FontSize(size Size) *trees.Style {
	return &trees.Style{Name: "font-size", Value: string(size)}
}
322513
func OpenFont(file string, size int) (*Font, error) {
	_file := C.CString(file)
	defer C.free(unsafe.Pointer(_file))
	_size := (C.int)(size)
	f := (*C.TTF_Font)(C.TTF_OpenFont(_file, _size))

	if f == nil {
		return nil, GetError()
	}
	return &Font{f}, nil
}
854497
func (c *Page) SetFontFamiliesWithParams(v *PageSetFontFamiliesParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Page.setFontFamilies", Params: v})
}
57701
func (f *Fpdf) SetTextColor(r, g, b int) {
	f.setTextColor(r, g, b)
}
759607
func (v *ViewPort) SetSize(width, height int) {
	v.height = height
	v.width = width
	v.ValidateView()
}
7794
func (s *DvbSubDestinationSettings) SetFontScript(v string) *DvbSubDestinationSettings {
	s.FontScript = &v
	return s
}
960230
func (scaledFont *ScaledFont) GetFontOptions(options *FontOptions) {
	C.cairo_scaled_font_get_font_options(scaledFont.Ptr, options.Ptr)
	if err := scaledFont.status(); err != nil {
		panic(err)
	}
}