X11Font(3) User Contributed Perl Documentation X11Font(3)

# [NAME](#NAME)

Tk::Font - a class for finding X Fonts

# [SYNOPSIS](#SYNOPSIS)

```
 use Tk::X11Font;
 $font = $widget->X11Font(foundry => 'adobe',
                       family  => 'times',
                       point   => 120
                      );
 $font = $widget->X11Font('*-courier-medium-r-normal-*-*');
```

# [DESCRIPTION](#DESCRIPTION)

```
   This module can be use to interrogate the X server what fonts are
   avaliable.
```

# [METHODS](#METHODS)

## [Foundry( \[ $val \] )](#Foundry%28___$val___%29)

## [Family( \[ $val \] )](#Family%28___$val___%29)

## [Weight( \[ $val \] )](#Weight%28___$val___%29)

## [Slant( \[ $val \] )](#Slant%28___$val___%29)

## [Swidth( \[ $val \] )](#Swidth%28___$val___%29)

## [Adstyle( \[ $val \] )](#Adstyle%28___$val___%29)

## [Pixel( \[ $val \] )](#Pixel%28___$val___%29)

## [Point( \[ $val \] )](#Point%28___$val___%29)

## [Xres( \[ $val \] )](#Xres%28___$val___%29)

## [Yres( \[ $val \] )](#Yres%28___$val___%29)

## [Space( \[ $val \] )](#Space%28___$val___%29)

## [Avgwidth( \[ $val \] )](#Avgwidth%28___$val___%29)

## [Registry( \[ $val \] )](#Registry%28___$val___%29)

## [Encoding( \[ $val \] )](#Encoding%28___$val___%29)

Set the given field in the font name to $val if given and return the current or previous value

## [Name( \[ $max \] )](#Name%28___$max___%29)

In a list context it returns a list of all font names that match the fields given. It will return a maximum of $max names, or 128 if $max is not given.

In a scalar contex it returns the first matching name or undef

## [Clone( \[ key =&gt; value, \[ ...\]\] )](#Clone%28___key_=__value,___...___%29)

Create a duplicate of the curent font object and modify the given fields

# [AUTHOR](#AUTHOR)

Graham Barr &lt;Graham.Barr@tiuk.ti.com&gt;

# [HISTORY](#HISTORY)

11-Jan-96 Initial version

08-Nov-98 Renamed for Tk800.012

# [COPYRIGHT](#COPYRIGHT)

Copyright (c) 1995-1996 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2026-08-31 perl v5.44.0

---

Document: Tk::X11Font(3pm) from perl-tk 804.036-r11 (Chainguard OS)
Source: https://github.com/eserte/perl-tk
