True about the conversion. The best InDesign does in that area is 1pt = 1px, which mechanically cannot be an actual 1:1 relationship, seeing as 1px is not a constant.
Furthermore, due to the nuances of its type engine, it's pretty safe to say attempts to replicate InDesign's paragraph composition in any other environment will certainly fail. Whoever it is insisting you do so simply isn't aware of what's involved. You'd have a better chance the other way around; using InDesign's controls to dumb down the composition to levels more typical of HTML/CSS, then promising to replicate that with HTML/CSS.
Agreed, it's way too optimistic. InDesign is a typographic design application, under development since 1999. Already in its very first version, its type engine came "fully grown and armed, with a shout", supporting enough advanced features to squash all but the very stubbornest competition (I'm looking at you, TeX).
HTML/CSS, on the other hand, has had problems displaying "plain text" since its very beginnings. Only the very latest version of CSS finally addresses some typographic features (probably unnecessary to add, but anyway: with mixed results for different browsers).
" ..it seems that InDesign is using [its] own conversion for what it considers a pixel", you bet it does. After all, there was a web crowd that outright demanded "pixels" to be a measurement unit in InDesign. Adobe did a have a stab at adding pixels, and if one would ask me, they did it the wrong way. But that's no fault in InDesign. ID has its roots firmly in the "real world", that is, you can design a document with a precision right up to the wavelength of visible light; and ID will happily produce output for it. Your "pixel", on the other -- Darker -- Side, "is" not a real thing. It has no width or height. If you think it does, it goes only for your screen. You may say, "but if necesasry I can hold a magnifier to my screen and count the itty bitty lights!" What if you do so, and discover that your screen does not consist of square pixels, but round ones, or hexagonal, or elongated rectangles? And any measurement would only be value for just your screen. What about mine, your bosses', or your client's?
Following John's advice, here is a list of features you would need to switch off (as most are enabled by default) before you can even think of mimicking ID's sophisticated text engine in HTML:
- alternate characters
- real small capitals
- tabular or oldstyle figures
- .. wait -- better switch off *all* OTF features
- Paragraph composer. Use the dumb One Line At A Time And We'll See How Far We Get Composer.
- Language based hyphenation.
- Minimum/Optimal/Maximum Word Spacing (CSS must be using this internally, else it could not show justified text; however, I don't think you can set its parameters)
- Letter Spacing and Glyph Scaling (although to be fair, these seem to be already off by default).
- ~16 decimals of precision for every object, line width, text size, spacing, et cetera
- any real-world based measurement unit.
I probably forgot a few too.
- Advanced character/class kerning
- Optical kerning (not enabled by default)
- Balance Ragged Lines (off by default; but you can't use it)
- Optical Margin Alignment (as above)
- Align to Baseline grid
- last line indent
- Align to spine
- justify last line (can only be achieved with span/div tricks)
- about all internal hyphenation settings (CSS allows 'none', 'manual', and 'auto')
- live text color outline (I may be mistaken, but I bet if it were possible literally everybody would be using it by now -- just like the dreaded "blink" tag did, before it was deemed illegal by federal law)
- skewed text. I know, nobody with a grain of sense uses it in ID.[*] Still, you can't do it in CSS so I'm gonna list it anyway.
[*] Except myself, by the way. But I don't use it willy-nilly, only after exhausting all the good and the bad options; then yes, I go for the Ugly look.
Message was edited by: [Jongware]
Message was edited by: [Jongware]
- stroke styles. You have a couple in CSS but ID allows "Wavy", "Feet", and "Woof".
- tints of colors. CSS needs absolute values.
- custom line ends, stroke alignment, corner options, and line end adornments
- vertical justification (how could any page or frame based option work, on a continuous scrolling HTML "page"?)
- anything involving live overprint (per definition a Real World Effect only)
- any font inside a larger font family. ID is not limited to "Roman, Italic, Bold, Bold Italic".
- any character (more correctly: glyph) inside any of those fonts, even if it doesn't have a Unicode
- Type On A Path
- Right Indent Tab
The challenging part is that it is required to be 1:1 pixel perfect.
Can I ask why that matters for this project?
Print and web are two different media with different strengths/weaknesses and audiences.
People read print. They scan the web.
Usually print content (text/images but not formatting) is re-purposed for the web. It's not usually mission critical to reproduce print layouts to pixel perfect accuracy. It's somewhat akin to language translation - meaning and context is more important than literal word-for-word translation.
because it seems that InDesign is using it’s own conversion for what it considers a pixel.
In CS6 and later double click the Zoom Tool to get a 1:1 ratio—the view will be the same as Photoshop's 1:1 (100%). In earlier versions the 1:1 ratio was at the 100% view.
Here I have 800x600 pixel documents opened in both ID and PS:
If you want to keep objects on pixel increments, set your Grid prefs to something like Gridline every 1px with 100 px subdivisions and turn on View>Grids&Guides>Snap to Doc Grid.
As others have pointed out the typographic limitations are with HTML not ID.