FontGraphic (クラス)
public abstract FontGraphic {inherits FontGraphicMixin, Graphic}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.
直接継承しているサブクラス: CharGraphic, TextEditPanel

Font 情報をキャッシュする Graphic


コンストラクタ
clone-appearance-from:このタイプの新しいオブジェクトを作成するために Visual.clone-appearance が使用するコンストラクタ。
コンストラクタ protected {FontGraphic.clone-appearance-from other:FontGraphic}
default:このオブジェクトを作成します。
コンストラクタ public {FontGraphic.default ...}

プロパティ
text-breakable?:テキストの複数行にまたがる分割を許すかどうかを指定します。
非ローカル オプション public FontGraphic.text-breakable?:bool
text-preserve-whitespace?:テキスト内の空白文字と改行を保持するか、または削除するかを指定します。
非ローカル オプション public FontGraphic.text-preserve-whitespace?:bool
プロパティ 継承 Graphic: avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, clip-child-shadows?, discrete-select-in-range?, enabled?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visible?, visual-parent, vorigin, width
プロパティ 継承 FontVisualMixin: cached-display-context, color, display-context, font, font-family, font-size, font-style, font-weight, text-line-through?, text-underline?
プロパティ 継承 Visual: _style-element, clonable-class?, completely-clonable-children?, cursor, data-source, dragee, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-element, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
メソッド 継承 FontGraphicMixin: react-to-font-option-change
メソッド 継承 Graphic: after-reposition, attempt-revalidate-layout, before-reposition, constrain-height, constrain-width, contains-point?, create-pagination-state, detach, draw, draw-range-as-selected, draw-shadow, end-pagination, find-ancestor, find-graphic-at, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-height-preference, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-range-as-selected-text, get-top-left-in-ancestor, get-visible-bounds-into, get-width-preference, graphical-child-visible-at, make-gui-mark, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paginate, paint-with-decorations, pointer-enter-occurred, pointer-leave-occurred, replace-with, request-draw, request-draw-rect, request-layout, request-pointer-trace, search-next, search-next-here, search-prev, search-prev-here, set-layout, set-size, start-pagination, xy-offset-to
メソッド 継承 FontVisualMixin: calculate-pointsize, font-option-changed, get-display-context, invalidate-font, update-font-metrics, validate-font
メソッド 継承 Visual: add, add-from-init-args, animate, change-cursor, clear, clonable-appearance?, clone-appearance, clone-appearance-helper, find-test-children, get-focus-manager, get-gui-path-to-child, get-layout-context, get-test-parent, get-test-property, get-text, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-attached, note-caret-position, note-detaching, on-drag-leave, on-pointer-envelope-event, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates
メソッド 継承 GraphicOptions: any-to-Distance
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, notify-option-children, option-change-notify, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, register-options, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
clone-appearance-from (コンストラクタ)
protected {FontGraphic.clone-appearance-from other:FontGraphic}

このタイプの新しいオブジェクトを作成するために Visual.clone-appearance が使用するコンストラクタ。

other: クローンする FontGraphic

注意事項

クローン化をサポートする FontGraphic のサブクラスには、このコンストラクタを呼び出すコンストラクタが必要です。ただし、これらのコンストラクタがそれぞれ自身のオプションをクローン化する場合は、その限りではありません。


default (コンストラクタ)
public {FontGraphic.default ...}

このオブジェクトを作成します。

...: 追加のオプションおよびイベント ハンドラ指定。



プロパティ詳細
text-breakable? (非ローカル オプション)
public FontGraphic.text-breakable?:bool

テキストの複数行にまたがる分割を許すかどうかを指定します。

説明

テキストを表示するオブジェクト (たとえば、TextFlowBox) は、複数行にまたがるテキスト表示の改行をサポートします。ただし、テキスト内のどこででも改行できるわけではありません。

たとえば、西洋のテキストでは、空白文字の直後は改行個所として適切ですが、2 つの文字の間は改行個所として適切ではありません。日本語のテキストでは、2 つのカタカナの間は一般的に適切と考えられますが、句読点のすぐ前はそうではありません。

現在 Curl 実行環境で使用されている、text 表示のための改行のアルゴリズムは、さまざまなロケールのテキストをレイアウトするのに適している、国際的なルールのセットに基づいています。しかし、単一のルール セットの使用は、ある特定の言語で正常でない改行動作を引き起こす可能性があります。

このオプションの値が false の場合、テキスト内のすべての位置が改行に不適切と考えられます。

強制的な改行 (たとえば、{br}) は、text-breakable? の値に優先し、そこで改行が行われることに注意してください。

以下の例は、2 つのテキスト部分を示しています。最初のテキストは、許可された位置で改行しています。2 番目のテキストは、通常では改行が許される位置でも、改行できないように指定されています。


{spaced-vbox
    width=2cm,
    background="wheat",
    {text In my spare time, I read http://www.curl.com.},
    {text text-breakable?=false,
        In my spare time, I read http://www.curl.com.
    }
}

参照:

文字書式: no-break


text-preserve-whitespace? (非ローカル オプション)
public FontGraphic.text-preserve-whitespace?:bool

テキスト内の空白文字と改行を保持するか、または削除するかを指定します。

説明

true または false に設定します。

以下の例は、2 つのテキスト部分を示しています。最初のテキストは、改行が許される個所、つまり空白の個所で改行しています。個々の単語内では改行していないことに注意してください。
{spaced-vbox
    background="wheat",
    {text The text fragment uses the default setting for the
        text-preserve-whitespace? option. Here
        begins a gap                    and the gap ends.},
    {text text-preserve-whitespace?=true,
        The text fragment sets the text-preserve-whitespace? option to true. Here
        begins a gap                    and the gap ends.}
}

注意事項

no-break テキスト フォーマット を使用していたり、特定の コントロール のラベル内にある場合のように、text-breakable? オプションが false の場合、 改行文字は空白文字として扱われ、改行として扱われません。

参照:

段落書式: pre





メソッド詳細