You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be there are two Measurements with the pt value DtpPoint and PrinterPoint so when a point measurement like 10pt is parsed it fails as the code thinks it matches two items.
string value="10pt";
IQuantity quantity = Quantity.From(0, LengthUnit.Centimeter);
if (Quantity.TryParse(typeof(Length), value, out quantity) == false)
{
Console.WriteLine ("Failed");
}
Hi, the problem is that there there seems to be no well defined unit abbreviations for these that help differentiate them.
A quick google does not reveal any conventions, so I guess we could do what we do for imperial gallons gallon (imp.) vs US gallons gallon (U.S.).
ChatGPT summary of DTP Point and Printer’s Point
Type
Inches per Point
Millimeters Approx.
Common Usage
DTP Point
1/72 inch (≈ 0.01389)
≈ 0.3528 mm
Digital publishing (e.g., Adobe, CSS, PDFs)
Printer’s Point
1/72.27 inch (≈ 0.01384)
≈ 0.3515 mm
Traditional typography (e.g., TeX, hot metal typesetting)
Key Differences:
DTP point is slightly larger than the traditional printer's point.
DTP (Desktop Publishing) point is the modern standard, defined as 1/72 inch.
Printer’s point (also known as TeX or PostScript point) originates from traditional print and is 1/72.27 inch.
While the size difference is minor (~0.004 mm), it can be relevant in precise typesetting or layout rendering.
My suggestion
Change the unit abbreviations from pt to:
DtpPoint: pt (DTP), or DTP, or keep it pt as it seems the most widely used today
PrinterPoint: pt (printer) or printer point
This would be a breaking change, but we can add it in #1200 that is currently in pre-release.
What would work best of the above suggestions do you think?
On Sat, 26 Jul 2025, 01:11 Andreas Gullberg Larsen, < ***@***.***> wrote:
*angularsen* left a comment (angularsen/UnitsNet#1573)
<#1573 (comment)>
Hi, the problem is that there there seems to be no well defined unit
abbreviations for these that help differentiate them.
A quick google does not reveal any conventions, so I guess we could do
what we do for imperial gallons gallon (imp.) vs US gallons gallon (U.S.).
ChatGPT summary of DTP Point and Printer’s Point
Type Inches per Point Millimeters Approx. Common Usage
*DTP Point* 1/72 inch (≈ 0.01389) ≈ 0.3528 mm Digital publishing (e.g.,
Adobe, CSS, PDFs)
*Printer’s Point* 1/72.27 inch (≈ 0.01384) ≈ 0.3515 mm Traditional
typography (e.g., TeX, hot metal typesetting) Key Differences:
- *DTP point* is slightly *larger* than the traditional *printer's
point*.
- *DTP (Desktop Publishing) point* is the modern standard, defined as *1/72
inch*.
- *Printer’s point* (also known as TeX or PostScript point) originates
from traditional print and is *1/72.27 inch*.
- While the size difference is minor (~0.004 mm), it can be relevant
in precise typesetting or layout rendering.
My suggestion
Change the unit abbreviations from pt to:
- DtpPoint: pt (DTP), or DTP, or keep it pt as it seems the most
widely used today
- PrinterPoint: pt (printer) or printer point
This would be a breaking change, but we can add it in #1200
<#1200> that is currently in
pre-release.
What would work best of the above suggestions do you think?
—
Reply to this email directly, view it on GitHub
<#1573 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADU5FPFUZQALHXSE2UE5M7D3KLBS7AVCNFSM6AAAAACCC22EWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRQG42TAOBZGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
I’m not familiar with printer’s points, so I asked AI to independently check the definitions, the discussion here, and UnitsNet’s parser. Here’s its recommendation.
Give plain pt to DtpPoint in v6 and use pt (TeX) for the existing PrinterPoint. CSS defines pt as 1/72 inch, and the current PrinterPoint conversion matches the TeX definition of 1/72.27 inch. Keep both public enum names and conversion factors. A case-only distinction like pt versus Pt is fragile because the parser also matches case-insensitively. CSS absolute lengths · TeX length units · UnitsNet parser matching
The pica collision can follow the same rule: pica for DtpPica and pica (TeX) for PrinterPica. Keep pc for parsecs in the general length parser. I asked AI to test those spellings with temporary abbreviation overrides. Plain 10pt, the qualified TeX forms, and both pica forms parsed and round-tripped in invariant, en-US, and fr-CA, and 1 pc still parsed as a parsec.
I’d call out the change in the v6 release notes because old formatted text such as 10 pt may have meant printer’s points and will parse as DTP points after this change. Once the spelling fix lands, the validator can drop the resolved pt and pica exceptions while keeping a separate test for genuinely ambiguous input. Current unit definitions · Unit-definition validator
Activity
SparkoUK commentedon Jul 22, 2025
Why are there two version of point as they both have the same value is there a way to work around this problem?
angularsen commentedon Jul 26, 2025
Hi, the problem is that there there seems to be no well defined unit abbreviations for these that help differentiate them.
A quick google does not reveal any conventions, so I guess we could do what we do for imperial gallons
gallon (imp.)vs US gallonsgallon (U.S.).ChatGPT summary of DTP Point and Printer’s Point
Key Differences:
My suggestion
Change the unit abbreviations from
ptto:pt (DTP), orDTP, or keep itptas it seems the most widely used todaypt (printer)orprinter pointThis would be a breaking change, but we can add it in #1200 that is currently in pre-release.
What would work best of the above suggestions do you think?
SparkoUK commentedon Jul 26, 2025
angularsen commentedon Aug 9, 2025
ptvsPtsounds very confusing to me.Reading this wiki, there are actually many historic definitions:
https://en.wikipedia.org/wiki/Point_(typography)#Varying_standards
It seems
PrinterPointshould maybe instead have been namedTeXPoint, as there are many definitions of print typography points.DTP is also known as PostScript, but I think DTP is better to use.
So my revised suggestion would be:
ptforDTP, since it seems the modern standard and what you find when googlingpt (TeX)forPrinterPointPrinterPointtoTeXPointto more clearangularsen commentedon Aug 9, 2025
Actually, reading a bit more, it seems TeX and American points are practically idential. We'd either choose one or add both, I guess.
github-actions commentedon Sep 9, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
github-actions commentedon Sep 17, 2025
This issue was automatically closed due to inactivity.
lipchev commentedon Nov 22, 2026
I’m not familiar with printer’s points, so I asked AI to independently check the definitions, the discussion here, and UnitsNet’s parser. Here’s its recommendation.
Give plain
pttoDtpPointin v6 and usept (TeX)for the existingPrinterPoint. CSS definesptas 1/72 inch, and the currentPrinterPointconversion matches the TeX definition of 1/72.27 inch. Keep both public enum names and conversion factors. A case-only distinction likeptversusPtis fragile because the parser also matches case-insensitively. CSS absolute lengths · TeX length units · UnitsNet parser matchingThe
picacollision can follow the same rule:picaforDtpPicaandpica (TeX)forPrinterPica. Keeppcfor parsecs in the general length parser. I asked AI to test those spellings with temporary abbreviation overrides. Plain10pt, the qualified TeX forms, and both pica forms parsed and round-tripped in invariant, en-US, and fr-CA, and1 pcstill parsed as a parsec.I’d call out the change in the v6 release notes because old formatted text such as
10 ptmay have meant printer’s points and will parse as DTP points after this change. Once the spelling fix lands, the validator can drop the resolvedptandpicaexceptions while keeping a separate test for genuinely ambiguous input. Current unit definitions · Unit-definition validator