Align a bone to a custom transform orientation and recalculate roll so that the bone Z axis points along the custom orientation X axis.
-
Select object face.
-
Create custom transform orientation (“Face” in this case) and keep it selected.
-
Snap (Shift-S) → Cursor to Selected
-
Enter armature Edit Mode.
-
Either add a new bone or select an existing bone.
-
Right click bone in edit mode and select “Align Bone to Transform Orientation”.
Or: F3 → “Align Bone to Transform Orientation”
-
Now the bone sits orthogonal on the selected face and is rolled in a way that its Z axis points along the X axis of the custom transform orientation.