Text this: A Generalization of Magic Squares with Applications to Digital Halftoning.