dwrite

package
v0.0.0-...-1af1188 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var IIDFactory = &syscall.GUID{0xb859ee5a, 0xd838, 0x4b5b, [8]byte{0xa2, 0xe8, 0x1a, 0xdc, 0x7d, 0x93, 0xdb, 0x48}}

Functions

This section is empty.

Types

type FactoryType

type FactoryType uint32
const (
	DWRITE_FACTORY_TYPE_SHARED   FactoryType = 0
	DWRITE_FACTORY_TYPE_ISOLATED FactoryType = 1
)

type FontStretch

type FontStretch uint32
const (
	DWRITE_FONT_STRETCH_UNDEFINED       FontStretch = 0
	DWRITE_FONT_STRETCH_ULTRA_CONDENSED FontStretch = 1
	DWRITE_FONT_STRETCH_EXTRA_CONDENSED FontStretch = 2
	DWRITE_FONT_STRETCH_CONDENSED       FontStretch = 3
	DWRITE_FONT_STRETCH_SEMI_CONDENSED  FontStretch = 4
	DWRITE_FONT_STRETCH_NORMAL          FontStretch = 5
	DWRITE_FONT_STRETCH_MEDIUM          FontStretch = 5
	DWRITE_FONT_STRETCH_SEMI_EXPANDED   FontStretch = 6
	DWRITE_FONT_STRETCH_EXPANDED        FontStretch = 7
	DWRITE_FONT_STRETCH_EXTRA_EXPANDED  FontStretch = 8
	DWRITE_FONT_STRETCH_ULTRA_EXPANDED  FontStretch = 9
)

type FontStyle

type FontStyle uint32
const (
	DWRITE_FONT_STYLE_NORMAL  FontStyle = 0
	DWRITE_FONT_STYLE_OBLIQUE FontStyle = 1
	DWRITE_FONT_STYLE_ITALIC  FontStyle = 2
)

type FontWeight

type FontWeight uint32
const (
	DWRITE_FONT_WEIGHT_THIN        FontWeight = 100
	DWRITE_FONT_WEIGHT_EXTRA_LIGHT FontWeight = 200
	DWRITE_FONT_WEIGHT_ULTRA_LIGHT FontWeight = 200
	DWRITE_FONT_WEIGHT_LIGHT       FontWeight = 300
	DWRITE_FONT_WEIGHT_SEMI_LIGHT  FontWeight = 350
	DWRITE_FONT_WEIGHT_NORMAL      FontWeight = 400
	DWRITE_FONT_WEIGHT_REGULAR     FontWeight = 400
	DWRITE_FONT_WEIGHT_MEDIUM      FontWeight = 500
	DWRITE_FONT_WEIGHT_DEMI_BOLD   FontWeight = 600
	DWRITE_FONT_WEIGHT_SEMI_BOLD   FontWeight = 600
	DWRITE_FONT_WEIGHT_BOLD        FontWeight = 700
	DWRITE_FONT_WEIGHT_EXTRA_BOLD  FontWeight = 800
	DWRITE_FONT_WEIGHT_ULTRA_BOLD  FontWeight = 800
	DWRITE_FONT_WEIGHT_BLACK       FontWeight = 900
	DWRITE_FONT_WEIGHT_HEAVY       FontWeight = 900
	DWRITE_FONT_WEIGHT_EXTRA_BLACK FontWeight = 950
	DWRITE_FONT_WEIGHT_ULTRA_BLACK FontWeight = 950
)

type IFactory

type IFactory struct{ direct.IUnknown }

func CreateFactory

func CreateFactory(factoryType FactoryType) (*IFactory, error)

func (*IFactory) CreateTextFormat

func (inf *IFactory) CreateTextFormat(fontFamilyName string, fontCollection *IFontCollection, fontWeight FontWeight, fontStyle FontStyle, fontStretch FontStretch, fontSize float32, localName string) (*ITextFormat, error)

type IFontCollection

type IFontCollection struct{ direct.IUnknown }

type ITextFormat

type ITextFormat struct{ direct.IUnknown }

func (*ITextFormat) SetParagraphAlignment

func (inf *ITextFormat) SetParagraphAlignment(paragraphAlignment ParagraphAlignment) error

func (*ITextFormat) SetTextAlignment

func (inf *ITextFormat) SetTextAlignment(textAlignment TextAlignment) error

type ParagraphAlignment

type ParagraphAlignment uint32
const (
	DWRITE_PARAGRAPH_ALIGNMENT_NEAR   ParagraphAlignment = 0
	DWRITE_PARAGRAPH_ALIGNMENT_FAR    ParagraphAlignment = 1
	DWRITE_PARAGRAPH_ALIGNMENT_CENTER ParagraphAlignment = 2
)

type TextAlignment

type TextAlignment uint32
const (
	DWRITE_TEXT_ALIGNMENT_LEADING   TextAlignment = 0
	DWRITE_TEXT_ALIGNMENT_TRAILING  TextAlignment = 1
	DWRITE_TEXT_ALIGNMENT_CENTER    TextAlignment = 2
	DWRITE_TEXT_ALIGNMENT_JUSTIFIED TextAlignment = 3
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL