본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    라이브러리 · std.typeset

    LatinSpacing.maxWordSpaceRatio

    Inspect the declaration, parameters, and availability of this API.

    LatinSpacing.maxWordSpaceRatio: float
    수신자
    LatinSpacing
    최소 인자 수
    0
    최대 인자 수
    0

    Declaration and parameters

    링크

    사용 조건

    기본 포함 · 미정

    Import std.typeset in language mode 5.21.

    The current compiler selects std/typeset.tpz for this language mode. Availability in other released editions and inclusion in each installed distribution are Pending.

    수신자

    LatinSpacing

    매개변수 제약

    LatinSpacing stores minWordSpaceRatio and maxWordSpaceRatio as dimensionless float values, maxLetterSpacingEm as Length<Em>, and fontSizePt as Length<Pt>. There is no implicit scalar or cross-unit conversion.

    Record construction and field reads store and return the supplied values. They do not validate a paragraph policy or resolve the relative length. Field expressions follow ordinary source-order evaluation once.

    A paragraph validates every supplied LatinSpacing record before planning. This validation also applies in Unjustified mode and with the KnuthPlass cost model.

    minWordSpaceRatio must be finite and between 0.8 and 1.0 inclusive. maxWordSpaceRatio must be finite and between 1.0 and 1.33 inclusive. Invalid ratios return Err containing TypesetError.InvalidPolicy.

    maxLetterSpacingEm must be between 0em and 0.015em inclusive on the stored relative grid. The upper bound is 983 em ticks. A negative tick or 984 ticks returns Err containing TypesetError.InvalidPolicy.

    fontSizePt must have a strictly positive scaled-point count. A one-scaled-point font is valid even when the paragraph uses millipoints. Zero and negative fonts return Err containing TypesetError.InvalidPolicy, including when letter spacing is zero.

    InvalidPolicy carries explanatory text. Its exact message text and the order among independent invalid policy fields are not fixed by this contract.

    Resolve the stored maximum with maxLetterSpacingEm.resolve(fontSizePt). The stored relative count is multiplied by the physical font count and divided by 65,536 with one nearest-even rounding to scaled points. No ambient font is read.

    Convert the resolved result to the selected computation grid. ScaledPoint preserves its integer count. MilliPoint applies the shared nearest-even conversion. Every eligible gap receives this rounded bound before multiplication by the gap count.

    An eligible Latin letter gap lies between adjacent retained text units. Each unit must contain an alphabetic scalar and every scalar must be in U+0041 through U+024F, U+0300 through U+036F, or U+1E00 through U+1EFF. Paragraph trimming determines the retained units.

    The retained line uses this capacity path when it contains a CJK unit, or contains a Latin letter unit and no other alphabetic unit. A non-Latin unit containing an alphabetic scalar counts as another alphabetic unit. Paragraph classification determines CJK units.

    Let S be the sum of the grid widths of retained units whose text is U+0020. Word shrink capacity is floor(float(S) * (1.0 - minWordSpaceRatio)). Word stretch capacity is floor(float(S) * (maxWordSpaceRatio - 1.0)). Each expression keeps that binary64 evaluation order and its independent floor.

    The letter stretch contribution is the eligible gap count times the quantized relative limit. CJK capacity retains its separate floor rule. Combining these contributions does not repeat font resolution or round their total as one relative length.

    Unjustified mode does not apply spacing capacity. KnuthPlass obtains stretch and shrink from glue after the shared policy validation. FixedPoint uses the validated Latin spacing in its justification capacity and requires MilliPoint.

    Resolution, integer accumulation, and capacity arithmetic use their checked numeric contracts. Overflow stops with TPZ4004 and does not return InvalidPolicy. Validation and conversion perform no I/O and do not mutate the record.

    For 0.01em at 12pt, 655 relative ticks resolve to 7,860 scaled points and then 120 millipoints. For 0.0078125em at 24pt, each gap receives 188 millipoints. Two such gaps provide 376 millipoints.

    결과

    The declared result type is float.

    효과

    실패

    Result and effects

    링크

    Select this field from a value of its named type without call parentheses.

    Store the maximum word-space ratio. Paragraph admission requires a finite value from 1.0 through 1.33 inclusive and returns TypesetError.InvalidPolicy otherwise.

    Resolved contracts

    링크

    Related entries

    링크

    std.typeset →

    Resolve relative letter spacing through Length

    링크
    규칙topaz.stdlib.contract.latin-spacing-em.rule

    Resolve relative letter spacing through Length

    LatinSpacing stores minWordSpaceRatio and maxWordSpaceRatio as dimensionless float values, maxLetterSpacingEm as Length<Em>, and fontSizePt as Length<Pt>. There is no implicit scalar or cross-unit conversion.

    Record construction and field reads store and return the supplied values. They do not validate a paragraph policy or resolve the relative length. Field expressions follow ordinary source-order evaluation once.

    A paragraph validates every supplied LatinSpacing record before planning. This validation also applies in Unjustified mode and with the KnuthPlass cost model.

    minWordSpaceRatio must be finite and between 0.8 and 1.0 inclusive. maxWordSpaceRatio must be finite and between 1.0 and 1.33 inclusive. Invalid ratios return Err containing TypesetError.InvalidPolicy.

    maxLetterSpacingEm must be between 0em and 0.015em inclusive on the stored relative grid. The upper bound is 983 em ticks. A negative tick or 984 ticks returns Err containing TypesetError.InvalidPolicy.

    fontSizePt must have a strictly positive scaled-point count. A one-scaled-point font is valid even when the paragraph uses millipoints. Zero and negative fonts return Err containing TypesetError.InvalidPolicy, including when letter spacing is zero.

    InvalidPolicy carries explanatory text. Its exact message text and the order among independent invalid policy fields are not fixed by this contract.

    Resolve the stored maximum with maxLetterSpacingEm.resolve(fontSizePt). The stored relative count is multiplied by the physical font count and divided by 65,536 with one nearest-even rounding to scaled points. No ambient font is read.

    Convert the resolved result to the selected computation grid. ScaledPoint preserves its integer count. MilliPoint applies the shared nearest-even conversion. Every eligible gap receives this rounded bound before multiplication by the gap count.

    An eligible Latin letter gap lies between adjacent retained text units. Each unit must contain an alphabetic scalar and every scalar must be in U+0041 through U+024F, U+0300 through U+036F, or U+1E00 through U+1EFF. Paragraph trimming determines the retained units.

    The retained line uses this capacity path when it contains a CJK unit, or contains a Latin letter unit and no other alphabetic unit. A non-Latin unit containing an alphabetic scalar counts as another alphabetic unit. Paragraph classification determines CJK units.

    Let S be the sum of the grid widths of retained units whose text is U+0020. Word shrink capacity is floor(float(S) * (1.0 - minWordSpaceRatio)). Word stretch capacity is floor(float(S) * (maxWordSpaceRatio - 1.0)). Each expression keeps that binary64 evaluation order and its independent floor.

    The letter stretch contribution is the eligible gap count times the quantized relative limit. CJK capacity retains its separate floor rule. Combining these contributions does not repeat font resolution or round their total as one relative length.

    Unjustified mode does not apply spacing capacity. KnuthPlass obtains stretch and shrink from glue after the shared policy validation. FixedPoint uses the validated Latin spacing in its justification capacity and requires MilliPoint.

    Resolution, integer accumulation, and capacity arithmetic use their checked numeric contracts. Overflow stops with TPZ4004 and does not return InvalidPolicy. Validation and conversion perform no I/O and do not mutate the record.

    For 0.01em at 12pt, 655 relative ticks resolve to 7,860 scaled points and then 120 millipoints. For 0.0078125em at 24pt, each gap receives 188 millipoints. Two such gaps provide 376 millipoints.

    이유

    One relative length model gives a letter-spacing limit an explicit font and unit. Validating the stored policy before planning separates field construction from recoverable policy errors. Per-gap quantization makes the permitted adjustment reproducible.

    Store a relative spacing length and an explicit point font size

    링크
    main.tpzStore a relative spacing length and an explicit point font size플레이그라운드 열기 →
    1. import std.typeset as ts
    2. let value = ts.LatinSpacing {
    3. minWordSpaceRatio: 0.8,
    4. maxWordSpaceRatio: 1.33,
    5. maxLetterSpacingEm: 0.01em,
    6. fontSizePt: 12pt
    7. }
    8. let relative: Length<Em> = value.maxLetterSpacingEm
    9. let physical: Length<Pt> = relative.resolve(value.fontSizePt)
    기대 출력종료 코드 0
    표준 출력 없음.
    $ topaz check main.tpz --format json · 대상 제품 5.21.3
    기대 결과

    기대 결과

    검사가 프로그램을 받아들입니다. 종료 코드 0.

    Resolve the stored spacing before converting to the computation grid

    링크
    main.tpzResolve the stored spacing before converting to the computation grid플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. let spacing = ts.LatinSpacing {
    4. minWordSpaceRatio: 0.8,
    5. maxWordSpaceRatio: 1.33,
    6. maxLetterSpacingEm: 0.01em,
    7. fontSizePt: 12pt
    8. }
    9. let limit = spacing.maxLetterSpacingEm.resolve(spacing.fontSizePt)
    10. let exact = limit == ts.fromScaledPoints(7860)
    11. let millipoints = limit.toMilliPoints()
    12. io.writeLine("{exact}|{millipoints}")
    기대 출력종료 코드 0
    true|120
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. true|120

    Apply nearest-even rounding at each typed value boundary

    링크
    main.tpzApply nearest-even rounding at each typed value boundary플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. let lowTie = (0.5em).resolve(ts.fromScaledPoints(3)) == ts.fromScaledPoints(2)
    4. let highTie = (0.5em).resolve(ts.fromScaledPoints(5)) == ts.fromScaledPoints(2)
    5. let literalGrid = (0.01em).resolve(12pt) == ts.fromScaledPoints(7860)
    6. let gridLow = (0.5em).resolve(0.125pt).toMilliPoints()
    7. let gridHigh = (0.5em).resolve(0.375pt).toMilliPoints()
    8. io.writeLine("{lowTie}|{highTie}|{literalGrid}|{gridLow}|{gridHigh}")
    기대 출력종료 코드 0
    true|true|true|62|188
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. true|true|true|62|188

    Reject an untyped multiplier in the relative-length field

    링크
    main.tpzReject an untyped multiplier in the relative-length field플레이그라운드 열기 →
    1. import std.typeset as ts
    2. let spacing = ts.LatinSpacing {
    3. minWordSpaceRatio: 0.8,
    4. maxWordSpaceRatio: 1.33,
    5. maxLetterSpacingEm: 0.01,
    6. fontSizePt: 12pt
    7. }
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check main.tpz --format json · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    • TPZ5001 →

      stdlib-relative-distance-requires-em at main.tpz:5:23

    Reject a physical length where an em length is required

    링크
    main.tpzReject a physical length where an em length is required플레이그라운드 열기 →
    1. import std.typeset as ts
    2. let spacing = ts.LatinSpacing {
    3. minWordSpaceRatio: 0.8,
    4. maxWordSpaceRatio: 1.33,
    5. maxLetterSpacingEm: 0.12pt,
    6. fontSizePt: 12pt
    7. }
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check main.tpz --format json · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    • TPZ5001 →

      stdlib-relative-distance-requires-em at main.tpz:5:23

    Reject treating the stored relative length as a float

    링크
    main.tpzReject treating the stored relative length as a float플레이그라운드 열기 →
    1. import std.typeset as ts
    2. function multiplier(value: ts.LatinSpacing) -> float {
    3. value.maxLetterSpacingEm
    4. }
    기대 출력0이 아닌 종료 코드
    표준 출력 없음.
    $ topaz check main.tpz --format json · 대상 제품 5.21.3
    기대 결과

    기대 결과

    거절 단계 check. 종료 코드가 0이 아닙니다.

    • TPZ5001 →

      stdlib-relative-distance-is-not-float at main.tpz:3:3

    Admit the inclusive ratio and font bounds

    링크
    main.tpzAdmit the inclusive ratio and font bounds플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. function paragraph(grid: ts.DistanceGrid, spacing: Option<ts.LatinSpacing>) -> ts.Paragraph {
    4. ts.Paragraph {
    5. grid: grid,
    6. items: [
    7. ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "abc", width: 10pt, trackingAfter: 0pt }),
    8. ts.Item.PenaltyItem(ts.Penalty {
    9. unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(),
    10. kind: ts.BreakKind.ForcedEnd(), flagged: false
    11. })
    12. ],
    13. geometry: ts.LineGeometry {
    14. bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt
    15. },
    16. justification: ts.JustificationPolicy {
    17. mode: ts.JustificationMode.Unjustified(),
    18. minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(),
    19. maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0,
    20. latinSpacing: spacing, cjkStretchRatio: 0.0
    21. },
    22. costModel: ts.CostModel.FixedPoint(),
    23. knuthPlass: ts.KnuthPlassPolicy {
    24. toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0,
    25. flaggedDemerit: 0, finalFlaggedDemerit: 0
    26. }
    27. }
    28. }
    29. for value in ([ts.LatinSpacing { minWordSpaceRatio: 0.8, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0em, fontSizePt: ts.fromScaledPoints(1) },
    30. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.33, maxLetterSpacingEm: 0.015em, fontSizePt: 12pt }]) {
    31. match (ts.breakParagraph(paragraph(ts.DistanceGrid.MilliPoint(), Some(value)))) {
    32. case Ok(_) => io.writeLine("valid policy")
    33. case Err(_) => io.writeLine("unexpected error")
    34. }
    35. }
    기대 출력종료 코드 0
    valid policy
    valid policy
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. valid policy
    2. valid policy

    Reject ratios just outside every allowed endpoint

    링크
    main.tpzReject ratios just outside every allowed endpoint플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. function paragraph(grid: ts.DistanceGrid, spacing: Option<ts.LatinSpacing>) -> ts.Paragraph {
    4. ts.Paragraph {
    5. grid: grid,
    6. items: [
    7. ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "abc", width: 10pt, trackingAfter: 0pt }),
    8. ts.Item.PenaltyItem(ts.Penalty {
    9. unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(),
    10. kind: ts.BreakKind.ForcedEnd(), flagged: false
    11. })
    12. ],
    13. geometry: ts.LineGeometry {
    14. bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt
    15. },
    16. justification: ts.JustificationPolicy {
    17. mode: ts.JustificationMode.Unjustified(),
    18. minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(),
    19. maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0,
    20. latinSpacing: spacing, cjkStretchRatio: 0.0
    21. },
    22. costModel: ts.CostModel.FixedPoint(),
    23. knuthPlass: ts.KnuthPlassPolicy {
    24. toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0,
    25. flaggedDemerit: 0, finalFlaggedDemerit: 0
    26. }
    27. }
    28. }
    29. for value in ([ts.LatinSpacing { minWordSpaceRatio: 0.7999, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0em, fontSizePt: 12pt },
    30. ts.LatinSpacing { minWordSpaceRatio: 1.0001, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0em, fontSizePt: 12pt },
    31. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 0.9999, maxLetterSpacingEm: 0em, fontSizePt: 12pt },
    32. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.3301, maxLetterSpacingEm: 0em, fontSizePt: 12pt }]) {
    33. match (ts.breakParagraph(paragraph(ts.DistanceGrid.MilliPoint(), Some(value)))) {
    34. case Err(InvalidPolicy(_)) => io.writeLine("invalid ratio")
    35. case _ => io.writeLine("unexpected result")
    36. }
    37. }
    기대 출력종료 코드 0
    invalid ratio
    invalid ratio
    invalid ratio
    invalid ratio
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. invalid ratio
    2. invalid ratio
    3. invalid ratio
    4. invalid ratio

    Reject negative spacing and nonpositive fonts

    링크
    main.tpzReject negative spacing and nonpositive fonts플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. function paragraph(grid: ts.DistanceGrid, spacing: Option<ts.LatinSpacing>) -> ts.Paragraph {
    4. ts.Paragraph {
    5. grid: grid,
    6. items: [
    7. ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "abc", width: 10pt, trackingAfter: 0pt }),
    8. ts.Item.PenaltyItem(ts.Penalty {
    9. unitEnd: 1, width: 0pt, rule: ts.BreakRule.Forced(),
    10. kind: ts.BreakKind.ForcedEnd(), flagged: false
    11. })
    12. ],
    13. geometry: ts.LineGeometry {
    14. bodyTarget: 10pt, firstTarget: 10pt, dropCapSpan: 0, dropCapInset: 0pt
    15. },
    16. justification: ts.JustificationPolicy {
    17. mode: ts.JustificationMode.Unjustified(),
    18. minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(),
    19. maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0,
    20. latinSpacing: spacing, cjkStretchRatio: 0.0
    21. },
    22. costModel: ts.CostModel.FixedPoint(),
    23. knuthPlass: ts.KnuthPlassPolicy {
    24. toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0,
    25. flaggedDemerit: 0, finalFlaggedDemerit: 0
    26. }
    27. }
    28. }
    29. for value in ([ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: -0.0000152587890625em, fontSizePt: 12pt },
    30. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0.0150146484375em, fontSizePt: 12pt },
    31. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0em, fontSizePt: 0pt },
    32. ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0em, fontSizePt: -12pt }]) {
    33. match (ts.breakParagraph(paragraph(ts.DistanceGrid.MilliPoint(), Some(value)))) {
    34. case Err(InvalidPolicy(_)) => io.writeLine("invalid length policy")
    35. case _ => io.writeLine("unexpected result")
    36. }
    37. }
    기대 출력종료 코드 0
    invalid length policy
    invalid length policy
    invalid length policy
    invalid length policy
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. invalid length policy
    2. invalid length policy
    3. invalid length policy
    4. invalid length policy

    Read a stored policy before paragraph validation

    링크
    main.tpzRead a stored policy before paragraph validation플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. let value = ts.LatinSpacing { minWordSpaceRatio: 0.0, maxWordSpaceRatio: 2.0, maxLetterSpacingEm: 1em, fontSizePt: 0pt }
    4. io.writeLine("{value.minWordSpaceRatio == 0.0}|{value.maxWordSpaceRatio == 2.0}|{value.maxLetterSpacingEm == 1em}|{value.fontSizePt == 0pt}")
    기대 출력종료 코드 0
    true|true|true|true
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. true|true|true|true

    Fill a line using a rounded bound for every letter gap

    링크
    main.tpzFill a line using a rounded bound for every letter gap플레이그라운드 열기 →
    1. import std.typeset as ts
    2. import std.io
    3. import std.test
    4. function paragraph(grid: ts.DistanceGrid, spacing: Option<ts.LatinSpacing>) -> ts.Paragraph {
    5. ts.Paragraph {
    6. grid: grid,
    7. items: [
    8. ts.Item.BoxItem(ts.Box { unitIndex: 0, text: "a", width: 1pt, trackingAfter: 0pt }),
    9. ts.Item.BoxItem(ts.Box { unitIndex: 1, text: "b", width: 1pt, trackingAfter: 0pt }),
    10. ts.Item.BoxItem(ts.Box { unitIndex: 2, text: "c", width: 1pt, trackingAfter: 0pt }),
    11. ts.Item.PenaltyItem(ts.Penalty {
    12. unitEnd: 3, width: 0pt, rule: ts.BreakRule.Forced(),
    13. kind: ts.BreakKind.LatinSpace(), flagged: false
    14. }),
    15. ts.Item.BoxItem(ts.Box { unitIndex: 3, text: "xyz", width: 3.376pt, trackingAfter: 0pt }),
    16. ts.Item.PenaltyItem(ts.Penalty {
    17. unitEnd: 4, width: 0pt, rule: ts.BreakRule.Forced(),
    18. kind: ts.BreakKind.ForcedEnd(), flagged: false
    19. })
    20. ],
    21. geometry: ts.LineGeometry {
    22. bodyTarget: 3.376pt, firstTarget: 3.376pt, dropCapSpan: 0, dropCapInset: 0pt
    23. },
    24. justification: ts.JustificationPolicy {
    25. mode: ts.JustificationMode.LatinWordSpace(),
    26. minGapCount: 0, minLineWidthRatioM: 0, minFinalLineWidthRatioM: None(),
    27. maxAdjustment: 0pt, maxGapAdjustment: 0pt, maxGapRatioR: 0,
    28. latinSpacing: spacing, cjkStretchRatio: 0.0
    29. },
    30. costModel: ts.CostModel.FixedPoint(),
    31. knuthPlass: ts.KnuthPlassPolicy {
    32. toleranceR: 100000000, linePenalty: 10, fitnessDemerit: 0,
    33. flaggedDemerit: 0, finalFlaggedDemerit: 0
    34. }
    35. }
    36. }
    37. let value = ts.LatinSpacing { minWordSpaceRatio: 1.0, maxWordSpaceRatio: 1.0, maxLetterSpacingEm: 0.0078125em, fontSizePt: 24pt }
    38. let result = test.assertOk(ts.breakParagraph(paragraph(ts.DistanceGrid.MilliPoint(), Some(value))))
    39. let filled = match (result.optimized.boundedFillFeasible) {
    40. case Some(value) => value
    41. case None() => false
    42. }
    43. io.writeLine("{filled}|{result.optimized.lines.length}|{result.optimized.lines[0].target == 3.376pt}")
    기대 출력종료 코드 0
    true|2|true
    
    $ topaz run main.tpz · 대상 제품 5.21.3
    기대 결과

    기대 결과

    실행을 마칩니다. 종료 코드 0.

    기대 표준 출력
    1. true|2|true

    Diagnostics

    링크

    TPZ5001 →

    메뉴

    다운로드 →