A sugar or an amino acid is drawn in Fischer projection with its most oxidised carbon at the top. It is D if the on the stereocentre farthest from the top (or, for an -amino acid, the on the carbon) points to the right, and L if it points to the left. The descriptors compare configurations with that of glyceraldehyde; they are not the CIP descriptors.
Chemistry · Glossary