This isn't too bad with a little Python. You'll have more flexibility formatting your strings and such with Python over HScript.
Assuming your detail attributes already exist on some node, you just have to create an expression on the Text attribute of your Font SOP, then right-click and change the expression language to Python. Then try this code:
node = hou.node("../attribwrangle1") # this should point to the node with the detail attrs
geo = node.geometry()
detail_attrs = geo.globalAttribs()
output = ""
if detail_attrs:
for attr in sorted(detail_attrs, key=lambda x: x.name()):
value = geo.attribValue(attr)
out = "{} = {}".format(attr.name(), value)
output = output + out + "\n"
return output
Python's string format function is great, you can do a lot with it beyond just simple substitution.