Forum How do I...?

Sidenote markers using opentype ordinals and css counters

javib
Hi, I have implemented sidenotes in a document using the example here https://css4.pub/2023/tufte/ so sidenotes markers are done using css counters with ::before this works great as it allows me to have plenty control over the superscript markers.

I am using an opentype font that has specific glyphs for the ordinals so I was wondering if there is a way to use the superscripts glyphs instead, I can imagine this is tricky as the css counters are inserted at the very end of the process so no search replace can be done easily?

Any suggestions? Many thanks!
javib
Finally managed to do this using the prince-text-replace which seems to run at the very end

    prince-text-replace:
        "1" "¹"
        "2" "²"
        "3" "³"
        "4" "⁴"
        "5" "⁵"
        "6" "⁶"
        "7" "⁷"
        "8" "⁸"
        "9" "⁹"
        "0" "⁰"
David J Prokopetz
The correct-according-to-the-CSS-spec way to handle this is using a @counter-style at-rule, which Prince regrettably does not yet support. It may be worth your while to submit a feature request to that effect, since you have a demonstrable use case for it.
mikeday
I will update the roadmap. Also, you could use the Prince-specific "symbols" counter style:

li::marker {
  content: counter(list-item, symbols('1', '2', '3'))
}