font

package
v1.3.394 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 4 Imported by: 10

Documentation

Overview

Package font 字体.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Font

type Font struct {
	objectbase.ObjectBase
}

Font 炫彩字体.

func New added in v1.3.352

func New(size int32) *Font

New 字体_创建, 创建炫彩字体. 当字体句柄与元素关联后, 会自动释放.

size: 字体大小,单位(pt, 磅).

func NewByFile added in v1.3.352

func NewByFile(pFontFile string, size int32, style xcc.FontStyle_) *Font

NewByFile 字体_创建从文件. 创建字体从文件.

pFontFile: 字体文件名.

size: 字体大小, 单位(pt, 磅).

style: 字体样式, xcc.FontStyle_ .

func NewByFont added in v1.3.352

func NewByFont(pFont uintptr) *Font

NewByFont 字体_创建从Font. 创建炫彩字体从GDI+字体.

pFont: GDI+ 字体指针.

func NewByHFONT added in v1.3.352

func NewByHFONT(hFont uintptr) *Font

NewByHFONT 字体_创建从HFONT. 创建炫彩字体从现有HFONT字体.

hFont: 字体句柄.

func NewByHandle added in v1.3.352

func NewByHandle(handle int) *Font

NewByHandle 从句柄创建对象.

handle: 炫彩字体句柄.

func NewByLOGFONTW added in v1.3.390

func NewByLOGFONTW(pFontInfo *xc.LOGFONTW) *Font

NewLOGFONTW 字体_创建从LOGFONT. 创建炫彩字体.

pFontInfo: 字体信息.

func NewByMem added in v1.3.352

func NewByMem(data []byte, fontSize int32, style xcc.FontStyle_) *Font

NewByMem 字体_创建从内存. 创建炫彩字体从内存.

data: 字体文件数据.

fontSize: 字体大小, 单位(pt, 磅).

style: 字体样式, xcc.FontStyle_ .

func NewByName added in v1.3.352

func NewByName(name string) *Font

NewByName 根据资源文件中的name创建对象, 失败返回nil.

name: name名称.

func NewByRes added in v1.3.352

func NewByRes(id int32, pType string, fontSize int32, style xcc.FontStyle_, hModule uintptr) *Font

NewByRes 字体_创建从资源. 创建字体从资源.

id: xx.

pType: xx.

fontSize: 字体大小, 单位(pt, 磅).

style: 字体样式, xcc.FontStyle_ .

hModule: xx.

func NewByZip added in v1.3.352

func NewByZip(pZipFileName, pFileName, pPassword string, fontSize int32, style xcc.FontStyle_) *Font

NewByZip 字体_创建从ZIP.

pZipFileName: zip文件名.

pFileName: 字体文件名.

pPassword: zip密码.

fontSize: 字体大小, 单位(pt, 磅).

style: 字体样式: xcc.FontStyle_ .

func NewByZipMem added in v1.3.352

func NewByZipMem(data []byte, pFileName, pPassword string, fontSize int32, style xcc.FontStyle_) *Font

NewByZipMem 字体_创建从内存ZIP.

data: zip数据.

pFileName: 字体文件名.

pPassword: zip密码.

fontSize: 字体大小, 单位(pt, 磅).

style: 字体样式: xcc.FontStyle_ .

func NewEX added in v1.3.352

func NewEX(pName string, size int32, style xcc.FontStyle_) *Font

NewEX 字体_创建扩展. 创建炫彩字体.

pName: 字体名称.

size: 字体大小, 单位(pt, 磅).

style: 字体样式, xcc.FontStyle_ .

func (*Font) AddRef

func (f *Font) AddRef() *Font

AddRef 字体_增加引用计数.

func (*Font) Destroy

func (f *Font) Destroy() *Font

Destroy 字体_销毁. 强制销毁炫彩字体, 谨慎使用, 建议使用 Release() 释放.

func (*Font) EnableAutoDestroy

func (f *Font) EnableAutoDestroy(bEnable bool) *Font

EnableAutoDestroy 字体_启用自动销毁. 是否自动销毁.

bEnable: 是否启用.

func (*Font) GetFont

func (f *Font) GetFont() uintptr

GetFont 字体_取Font. 获取字体. 返回GDI+ Font指针

func (*Font) GetFontInfo

func (f *Font) GetFontInfo(pInfo *xc.Font_Info_) *Font

GetFontInfo 字体_取信息. 获取字体信息.

pInfo: 接收返回的字体信息.

func (*Font) GetLOGFONTW

func (f *Font) GetLOGFONTW(hdc uintptr, pOut *xc.LOGFONTW) bool

GetLOGFONTW 字体_取LOGFONTW. 获取字体LOGFONTW.

hdc: hdc句柄.

pOut: 接收返回信息.

func (*Font) GetRefCount

func (f *Font) GetRefCount() int32

GetRefCount 字体_取引用计数.

func (*Font) GetUnderlineEdit added in v1.3.390

func (f *Font) GetUnderlineEdit() (bUnderline, bStrikeout bool)

GetUnderlineEdit 字体_取下划线. 仅供edit字体使用, 因为edit不支持下划线字体, 所以需要单独设置. bUnderline: 返回是否启用下划线. bStrikeout: 返回是否启用删除线.

func (*Font) Release

func (f *Font) Release() *Font

Release 字体_释放引用计数. 释放引用计数, 当引用计数为0时自动销毁.

func (*Font) SetUnderlineEdit added in v1.3.390

func (f *Font) SetUnderlineEdit(bUnderline, bStrikeout bool) *Font

SetUnderlineEdit 字体_置下划线. 仅供edit字体使用, 因为edit不支持下划线字体, 所以需要单独设置.

bUnderline: 是否启用下划线.

bStrikeout: 是否启用删除线.

Jump to

Keyboard shortcuts

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