.\" .\" $XFree86: xc/lib/Xft/Xft.man,v 1.2 2000/11/30 06:59:45 keithp Exp $ .\" .\" Copyright \(co 2000 Keith Packard, member of The XFree86 Project, Inc. .\" .\" Permission to use, copy, modify, distribute, and sell this software and its .\" documentation for any purpose is hereby granted without fee, provided that .\" the above copyright notice appear in all copies and that both that .\" copyright notice and this permission notice appear in supporting .\" documentation, and that the name of Keith Packard not be used in .\" advertising or publicity pertaining to distribution of the software without .\" specific, written prior permission. Keith Packard makes no .\" representations about the suitability of this software for any purpose. It .\" is provided "as is" without express or implied warranty. .\" .\" KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, .\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO .\" EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR .\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, .\" DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" .\" Copyright (c) 2000 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Mon Dec 25 16:11:21 JST 2000 .\" by FUJIWARA Teruyoshi .de TQ .br .ns .TP \\$1 .. .TH XFT 3 "Version 1.0" "XFree86" .SH 名前 .\"0 XFT \- X FreeType interface library XFT \- X 用の FreeType インタフェースライブラリ .SH 説明 .\"0 .B Xft .\"0 is a simple library designed to interface the FreeType rasterizer with the X .\"0 Rendering Extension. This manual page barely scratches the surface of this .\"0 library. .B Xft は FreeType ラスタライザと X Rendering 機能拡張とインタフェースとなるよう に設計された、簡単なライブラリである。このオンラインマニュアルではこの ライブラリの表面的な部分だけをかいつまんで説明する。 .\"0 .SH DATATYPES .SH データ型 .\"0 .B XftPattern .\"0 holds a set of names with associated value lists; each name refers to a .\"0 property of a font. XftPatterns are used as inputs to the matching code as .\"0 well as holding information about specific fonts. .B XftPattern は名前の集合とそのそれぞれに対応する値のリストを保持する。 それぞれの名前はフォントの属性を指す。 XftPattern はマッチング処理の入力や、特定のフォントに関する情報の保持 に使われる。 .\"0 .B XftFont .\"0 contains general font metrics and a pointer to either the core XFontStruct .\"0 data or a structure holding FreeType and X Render Extension data. .B XftFont はフォントの一般的な寸法および、 X のコア構造体である XFontStruct のデータあるいは FreeType と X Render 機能拡張のデータへのポインタを持つ。 .\"0 .B XftFontStruct .\"0 contains information about FreeType fonts used with the X Render Extension. .B XftFontStruct は X Render 機能拡張で使われる FreeType フォントに関する情報を持つ。 .\"0 .B XftFontSet .\"0 contains a list of XftPatterns. Internally Xft uses this data structure to .\"0 hold sets of fonts. Externally, Xft returns the results of listing fonts in .\"0 this format. .B XftFontSet は XftPattern のリストを持つ。内部的には、Xft はこのデータ構造体を使っ てフォントの集合を保持する。外部的には、Xft はこのフォーマットで フォントのリスト取得の結果を返す。 .\"0 .B XftObjectSet .\"0 holds a set of names and is used to specify which fields from fonts are .\"0 placed in the the list of returned patterns when listing fonts. .B XftObjectSet は名前の集合を保持する。これはフォントのリスト取得を行う際、 返されるパターンのリスト内にフォントのどのフィールドが置かれるのかを指 定するために使われる。 .\"0 .B XftDraw .\"0 is an opaque object which holds information used to render to an X drawable .\"0 using either core protocol or the X Rendering extension. .B XftDraw は opaque なオブジェクトであり、コアプロトコルまたは X Rendering 機能 拡張を使って X のドロウアブルをレンダリングするために使われる情報を保 持する。 .\"0 .SH FUNCTIONS .SH 関数 .nf XftFont * XftFontOpen (Display *dpy, int screen, ...); .fi .\"0 .B XftFontOpen .\"0 takes a list of pattern elements of the form (field, type, value) terminated .\"0 with a 0, matches that pattern against the available fonts and opens the .\"0 matching font. .B XftFontOpen は (フィールド, 型, 値) の形式のパターン要素のリストを引き数に取る。 このリストの末尾は 0 である。 この関数はこのパターンと利用可能なフォントを比べ、一致するフォントを オープンする。 .PP .\"0 Example: 使用例: .br font = XftFontOpen (dpy, scr, XFT_FAMILY, XftTypeString, "charter", XFT_SIZE, XftTypeDouble, 12.0); .PP .\"0 This opens the charter font at 12 points. The point size is automatically .\"0 converted to the correct pixel size based on the resolution of the monitor. この例では 12 ポイントの文字がオープンされる。ポイントサイズは、モニタ の解像度に基づいて自動的に適切なピクセルサイズに変換される。 .PP .nf void XftTextExtents8 (Display *dpy, XftFont *font, unsigned char *string, int len, XGlyphInfo *extents); .fi .\"0 .B XftTextExtents8 .\"0 computes the pixel extents of "string" when drawn with "font". .B XftTextExtents8 は文字列 "string" をフォント "font" で描画した時のピクセル単位での 大きさを計算する。 .PP .nf XftDraw * XftDrawCreate (Display *dpy, Drawable drawable, Visual *visual, Colormap colormap); .fi .\"0 .B XtDrawCreate .\"0 creates a structure that can be used to render text and rectangles .\"0 to the screen. .B XtDrawCreate は、テキストと矩形を画面に描画するために使う構造体を生成する。 .PP .nf void XftDrawString8 (XftDraw *d, XRenderColor *color, XftFont *font, int x, int y, unsigned char *string, int len); .fi .\"0 .B XftDrawString8 .\"0 draws "string" using "font" in "color" at "x, y". .B XftDrawString8 は、文字列 "string" をフォント "font", 色 "color" で、座標 "x, y" に描画 する。 .PP .nf void XftDrawRect (XftDraw *d, XRenderColor *color, int x, int y, unsigned int width, unsigned int height); .fi .\"0 .B XftDrawRect .\"0 fills a solid rectangle in the specified color. .B XftDrawRect は指定した色で矩形領域を塗りつぶす。 .\"0 .SH XftConfig .SH XftConfig .\"0 The .\"0 .B XftConfig .\"0 file contains configuration information for the Xft library consisting of .\"0 directories to look at for font information as well as instructions on .\"0 editing program specified font patterns before attempting to match the .\"0 available fonts. .B XftConfig ファイルには Xft ライブラリの設定情報が書かれる。このファイルには、 フォント情報を探す先のディレクトリや、プログラムが指定したフォント パターンを利用可能なフォントと比べる前に編集するための手順が書かれる。 .PP .nf config : "dir" STRING | "include" STRING | "includeif" STRING | "match" tests "edit" edits ; test : qual FIELD-NAME COMPARE CONSTANT ; qual : "any" | "all" ; edit : FIELD-NAME ASSIGN expr SEMI ; .fi .PP .\"0 STRINGs are double-quote delimited. FIELD-NAMEs are identifiers, .\"0 ASSIGN is one of "=", "+=" or "=+". expr can contain the usual .\"0 arithmetic operators and can include FIELD-NAMEs. STRING は二重引用符で区切られる。 FIELD-NAME は識別子であり、ASSIGN は "=", "+=", "=+" のいずれかである。 expr には普通の算術演算子と FIELD-NAME を含めることができる。 .PP .\"0 "dir" adds a directory to the list of places Xft will look for fonts. .\"0 There is no particular order implied by the list; Xft treats all fonts about .\"0 the same. "dir" は Xft がフォントを検索する場所のリストに指定したディレクトリを 追加する。 リストの順序には特に意味はない。Xft は全てのフォントを同列に扱う。 .PP .\"0 "include" and "includeif" cause Xft to load more configuration parameters .\"0 from the indicated file. "includeif" doesn't elicit a complaint if the file .\"0 doesn't exist. If the file name begins with a '~' character, it refers to a .\"0 path relative to the home directory of the user. "include" と "includeif" は、指定されたファイルから追加の 設定パラメータを読み込む。 "includeif" は指定されたファイルが存在しなくてもエラーを出さない。 ファイル名が '~' で始まる場合、そのファイル名はユーザの ホームディレクトリからの相対パスで参照される。 .PP .\"0 If the tests in a "match" statement all match a user-specified pattern, the .\"0 pattern will be edited with the specified instructions. "match" 文の中での評価が全てユーザが指定したパターンと一致した場合、 そのパターンは指定された手順で編集される。 .PP .\"0 Where ASSIGN is "=", the matching value in the pattern will be replaced by .\"0 the given expression. "+="/"=+" will prepend/append a new value to the list .\"0 of values for the indicated field. ASSIGN が "=" である場合、パターン中で一致した値は指定された表現に置き 換えられる。 "+="/"=+" は値のリストに対し、指定したフィールドに新しい値を前置/後置する。 .\"0 .SH RESTRICTIONS .SH 制限 .\"0 .B Xft .\"0 will probably change radically in the future; weak attempts will be made to .\"0 retain some level of source-file compatibility. .B Xft は将来的には大幅に変更されるだろう。 ソースコードレベルでの互換性を保とうとするつもりもあまりない。 .\"0 .SH AUTHOR .SH 著者 .\"0 Keith Packard, member of the XFree86 Project, Inc. Keith Packard (XFree86 Project, Inc. のメンバー)