# Panel:SetFontInternal

- **Ortam:** İstemci, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Panel:SetFontInternal
- **Çeviri tarihi:** 2025-09-08

```lua
Panel:SetFontInternal( string fontName )
```

## Açıklama

Bu panelin metnini işlemek için kullanılan yazı tipini ayarlar. Bu, [Label](https://gmod.tr/wiki/Label), [TextEntry](https://gmod.tr/wiki/TextEntry) ve [RichText](https://gmod.tr/wiki/RichText) için çalışır, ancak mevcut olduğunda kendi yerel `SetFont` ([DTextEntry:SetFont](https://gmod.tr/wiki/DTextEntry:SetFont), [DLabel:SetFont](https://gmod.tr/wiki/DLabel:SetFont)) metotlarını kullanmak daha iyi bir fikirdir.

Bir panel tarafından kullanılan yazı tipini almak için [Panel:GetFont](https://gmod.tr/wiki/Panel:GetFont) fonksiyonunu çağırın.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **fontName**: Yazı tipinin adı. Mevcut yazı tiplerinin bir listesi için [buraya](https://gmod.tr/wiki/Default_Fonts) bakın. Alternatif olarak, kendi özel yazı tipinizi oluşturmak için [surface.CreateFont](https://gmod.tr/wiki/surface.CreateFont) kullanın.

### Örnek

Bir [RichText](https://gmod.tr/wiki/RichText) elemanının yazı tipini, sohbet kutusu yazı tipiyle eşleşecek şekilde ayarlar.

```lua
-- Create a window frame
local TextFrame = vgui.Create( "DFrame" )
TextFrame:SetSize( 300, 200 )
TextFrame:Center()
TextFrame:SetTitle( "This is a font test" )
TextFrame:MakePopup()

-- RichText panel
local richtext = vgui.Create( "RichText", TextFrame )
richtext:Dock( FILL )

-- Sample text
richtext:SetText( "This is a sample of text using the chat box font." )

-- Ensure font and text color changes are applied
-- We have to wait until after the internals of RichText set the default font
function richtext:PerformLayout()

	if ( self:GetFont() != "ChatFont" ) then self:SetFontInternal( "ChatFont" ) end
	self:SetFGColor( color_white )

end
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/07c13c1a011adef24389.png)

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/Panel:SetFontInternal
