ホーム › Graphics.DirectWrite › DWRITE_SCRIPT_PROPERTIES
DWRITE_SCRIPT_PROPERTIES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| isoScriptCode | DWORD | 4 | +0 | +0 | 指定されたスクリプトに対する標準化された 4 文字コードです。 Note これらには一般的な Unicode スクリプトのみが含まれ、書誌的な区別のための追加の ISO 15924 スクリプトは含まれません。
|
| isoScriptNumber | DWORD | 4 | +4 | +4 | 標準化された数値コードで、0 ~ 999 の範囲です。 |
| clusterLookahead | DWORD | 4 | +8 | +8 | 複雑なスクリプトの先読みを見積もるための文字数です。ラテン文字およびすべての仮名は通常 1 です。インド系スクリプトは最大 15、その他のほとんどは 8 です。 Note 結合マークや異体字セレクターは、これらの先読みより長いクラスターを生成することがあるため、この見積もりは一般的な言語使用を想定したものです。ダイアクリティカルマークは個別に明示的にテストする必要があります。
|
| justificationCharacter | DWORD | 4 | +12 | +12 | 指定されたスクリプトを均等割り付けのために伸長するのに適した文字です。例:
|
| _bitfield | DWORD | 4 | +16 | +16 | 両端揃えの可否や空白・改行の扱いなどのスクリプト属性を格納するビットフィールド。 |
公式ドキュメント
DWRITE_SCRIPT_PROPERTIES 構造体は、キャレット移動と均等割り付けのためのスクリプトプロパティを指定します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DWRITE_SCRIPT_PROPERTIES (x64 20 / x86 20 バイト)
typedef struct DWRITE_SCRIPT_PROPERTIES {
DWORD isoScriptCode;
DWORD isoScriptNumber;
DWORD clusterLookahead;
DWORD justificationCharacter;
DWORD _bitfield;
} DWRITE_SCRIPT_PROPERTIES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DWRITE_SCRIPT_PROPERTIES
{
public uint isoScriptCode;
public uint isoScriptNumber;
public uint clusterLookahead;
public uint justificationCharacter;
public uint _bitfield;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DWRITE_SCRIPT_PROPERTIES
Public isoScriptCode As UInteger
Public isoScriptNumber As UInteger
Public clusterLookahead As UInteger
Public justificationCharacter As UInteger
Public _bitfield As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DWRITE_SCRIPT_PROPERTIES(ctypes.Structure):
_fields_ = [
("isoScriptCode", wintypes.DWORD),
("isoScriptNumber", wintypes.DWORD),
("clusterLookahead", wintypes.DWORD),
("justificationCharacter", wintypes.DWORD),
("_bitfield", wintypes.DWORD),
]#[repr(C)]
pub struct DWRITE_SCRIPT_PROPERTIES {
pub isoScriptCode: u32,
pub isoScriptNumber: u32,
pub clusterLookahead: u32,
pub justificationCharacter: u32,
pub _bitfield: u32,
}import "golang.org/x/sys/windows"
type DWRITE_SCRIPT_PROPERTIES struct {
isoScriptCode uint32
isoScriptNumber uint32
clusterLookahead uint32
justificationCharacter uint32
_bitfield uint32
}type
DWRITE_SCRIPT_PROPERTIES = record
isoScriptCode: DWORD;
isoScriptNumber: DWORD;
clusterLookahead: DWORD;
justificationCharacter: DWORD;
_bitfield: DWORD;
end;const DWRITE_SCRIPT_PROPERTIES = extern struct {
isoScriptCode: u32,
isoScriptNumber: u32,
clusterLookahead: u32,
justificationCharacter: u32,
_bitfield: u32,
};type
DWRITE_SCRIPT_PROPERTIES {.bycopy.} = object
isoScriptCode: uint32
isoScriptNumber: uint32
clusterLookahead: uint32
justificationCharacter: uint32
_bitfield: uint32struct DWRITE_SCRIPT_PROPERTIES
{
uint isoScriptCode;
uint isoScriptNumber;
uint clusterLookahead;
uint justificationCharacter;
uint _bitfield;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DWRITE_SCRIPT_PROPERTIES サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; isoScriptCode : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; isoScriptNumber : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; clusterLookahead : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; justificationCharacter : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; _bitfield : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DWRITE_SCRIPT_PROPERTIES
#field int isoScriptCode
#field int isoScriptNumber
#field int clusterLookahead
#field int justificationCharacter
#field int _bitfield
#endstruct
stdim st, DWRITE_SCRIPT_PROPERTIES ; NSTRUCT 変数を確保
st->isoScriptCode = 100
mes "isoScriptCode=" + st->isoScriptCode