If the numbers in a font look "old style" but are in glyph positions of
regular (lining) figures, I think you're out of luck. There's no way a
script will be able to detect that (unless you start doing some fancy
"convert to outlines" and compare the top and bottom of the bounding box
-- but may be impractical and would not always work).