This communication presents an effective method for writer recognition in handwritten documents. We have introduced a set of features that are extracted from the contours of handwritten images at different observation levels. At the global level, we extract the histograms of the chain code, the first and second order differential chain codes and, the histogram of the curvature indices at each point of the contour of handwriting. At the local level, the handwritten text is divided into a large number of small adaptive windows and within each window the contribution of each of the eight directions (and their differentials) is counted in the corresponding histograms. Two writings are then compared by computing the distances between their respective histograms. The system trained and tested on two different data sets of 650 and 225 writers respectively, exhibited promising results on writer identification and verification.