摘要
API 参考
属性
FontFace
代码示例
自定义文本频道窗口字体
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
local window = Instance.new("TextChannelWindow")
window.Size = UDim2.fromOffset(400, 300)
window.Target = TextChatService:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
-- FontFace 仅在 UseDefaultFont 为 false 时应用
window.UseDefaultFont = false
window.FontFace = Font.fromName("FredokaOne")
window.Parent = screenGuiUseDefaultFont
代码示例
自定义文本频道窗口字体
local Players = game:GetService("Players")
local TextChatService = game:GetService("TextChatService")
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
local window = Instance.new("TextChannelWindow")
window.Size = UDim2.fromOffset(400, 300)
window.Target = TextChatService:WaitForChild("TextChannels"):WaitForChild("RBXGeneral")
-- FontFace 仅在 UseDefaultFont 为 false 时应用
window.UseDefaultFont = false
window.FontFace = Font.fromName("FredokaOne")
window.Parent = screenGui