Firstly, I assume the strings spacings at the bridge are measured across from the high E nut/saddle perpendicular to the fret board centreline (FBC). This seems the only logical way as it not affected by the level of fanning, i.e. it reflects what string spacing measures traditionally; 'neck width feel' is consistent with non-fanned guitars. If you're using string spacing parallel to the line of the string end points, this method will need adjustment as two knowns and unknowns swap.
Draw a large diagram, not proportional. Exaggerate some dimensions (e.g. make bridge string spacing (BSS) double or so nut string spacing (NSS)) to make angles etc easier to see.
Calculate string spread angle (SSA, angle between high or low E and FBC). LSL is the lower scale length (for high E).
SSA = inverse sin(((BSS-NSS)/2) / LSL)
To calculate distance to perpendicular fret:
d = fret distance from nut
s = scale length
n = perpendicular fret number
d = s-s/(2^(n/12))
Do this for both E strings.
Position the perpendicular fret (PF) on the high E.
Calculate the distances from the PF to the low E and high E nut and bridge points parallel to the FBC.
A few more steps will give the bridge and nut angle; I can add them if it's not obvious.
There are a few very small triangles near the low E bridge and nut that could easily be missed. That's why skewing the diagram is important — it makes them more visible.