pub struct PartialCharShape {Show 23 fields
pub font: Option<String>,
pub size: Option<HwpUnit>,
pub bold: Option<bool>,
pub italic: Option<bool>,
pub color: Option<Color>,
pub underline_type: Option<UnderlineType>,
pub underline_color: Option<Color>,
pub strikeout_shape: Option<StrikeoutShape>,
pub strikeout_color: Option<Color>,
pub outline: Option<OutlineType>,
pub shadow: Option<ShadowType>,
pub emboss: Option<EmbossType>,
pub engrave: Option<EngraveType>,
pub vertical_position: Option<VerticalPosition>,
pub shade_color: Option<Color>,
pub emphasis: Option<EmphasisType>,
pub ratio: Option<i32>,
pub spacing: Option<i32>,
pub rel_sz: Option<i32>,
pub offset: Option<i32>,
pub use_kerning: Option<bool>,
pub use_font_space: Option<bool>,
pub char_border_fill_id: Option<u32>,
}Expand description
Character shape with all optional fields (for YAML parsing and inheritance).
After inheritance resolution, this is converted to CharShape where
all fields are guaranteed to be present.
Fields§
§font: Option<String>Font name (e.g. “한컴바탕”, “Arial”).
size: Option<HwpUnit>Font size.
bold: Option<bool>Bold weight.
italic: Option<bool>Italic style.
color: Option<Color>Text color in #RRGGBB.
underline_type: Option<UnderlineType>Underline type (None/Bottom/Center/Top).
underline_color: Option<Color>Underline color (inherits text color if None).
strikeout_shape: Option<StrikeoutShape>Strikeout line shape (None/Continuous/Dash/Dot/etc.).
strikeout_color: Option<Color>Strikeout color (inherits text color if None).
outline: Option<OutlineType>Text outline (1pt border around glyphs).
shadow: Option<ShadowType>Drop shadow.
emboss: Option<EmbossType>Emboss effect (raised).
engrave: Option<EngraveType>Engrave effect (sunken).
vertical_position: Option<VerticalPosition>Vertical position (Normal/Superscript/Subscript). Replaces bool superscript/subscript (backward compat: both supported).
shade_color: Option<Color>Background shade color (character-level highlight).
emphasis: Option<EmphasisType>Emphasis mark type (symMark: NONE, DOT_ABOVE, etc.).
ratio: Option<i32>Character width ratio (percent, uniform across all 7 lang groups). Default: 100. Range: 50-200.
spacing: Option<i32>Inter-character spacing (percent, uniform). Default: 0. Negative = tighter.
rel_sz: Option<i32>Relative font size (percent, uniform). Default: 100.
offset: Option<i32>Vertical position offset (percent, uniform). Default: 0.
use_kerning: Option<bool>Enable kerning (pair adjustment). Default: false.
use_font_space: Option<bool>Use font-defined inter-character spacing. Default: false.
char_border_fill_id: Option<u32>Border/fill reference for character-level border.
References a borderFill entry by raw ID. None = use the default
borderFillIDRef=2 (한글 default char background, no visible border).
Implementations§
Source§impl PartialCharShape
impl PartialCharShape
Sourcepub fn merge(&mut self, other: &PartialCharShape)
pub fn merge(&mut self, other: &PartialCharShape)
Merges other into self (child overrides parent).
Fields in other with Some value override self.
Trait Implementations§
Source§impl Clone for PartialCharShape
impl Clone for PartialCharShape
Source§fn clone(&self) -> PartialCharShape
fn clone(&self) -> PartialCharShape
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialCharShape
impl Debug for PartialCharShape
Source§impl Default for PartialCharShape
impl Default for PartialCharShape
Source§fn default() -> PartialCharShape
fn default() -> PartialCharShape
Source§impl<'de> Deserialize<'de> for PartialCharShape
impl<'de> Deserialize<'de> for PartialCharShape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PartialCharShape
impl JsonSchema for PartialCharShape
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more