There are lofts such as FX sails.. who will make a 'class' sail according to the original on-paper dimensions of the intended rig. There is, of course, a large data base of rig dimensions available to sailmakers and (now on-line) anyone who wants it.
However most of the time we're talking about a boat that's 20-30 years old or more.. you can't be sure the rig hasn't been modified, or the boat dismasted and the rig replaced, furlers added, etc etc any or all of which can result in a boat that is not really 'standard' anymore. Sails need to fit rather exactly in order to be properly set and trimmed. Undersized sails can be used at some cost of area and perhaps performance, but oversized sails in any dimension are going to be more problematic. Even the location of a jib track or jib lead might be wrong with a sail that doesn't quite 'fit'.
But go to the FX sails website for an example.. their prices are often nearly half of what a quality local loft would want and the delivery time is typically the same... You can measure your own boat to see if the listed measurements conform.. if they do, give it a go.
As a guide for measurement, try using a PHRF rating form (new member application PDF) here:
PHRF Forms | Pacific Handicap Racing Fleet
For a guide as to what the measurement numbers mean..
But in general:
J = distance from mast to forestay at deck - P26 is 11.7ft
I = height of foretriangle (jib) P26 is 31.5 ft
P = height from boom/tack to 'black band' or max hoist of main P26 is 27.5 ft
E = length of main from tack to clew (along boom) P26 is 10 ft
These are the dimensions to compare to any list of rig dimensions if you're looking for a second-hand 'fit'.