Using Simulated Annealing to Find Increased Sound-Shape Systematicity in Parametric Fonts
Total Page:16
File Type:pdf, Size:1020Kb
Using Simulated Annealing to Find Increased Sound-Shape Systematicity in Parametric Fonts Adam DePauw Master of Science Artificial Intelligence School of Informatics University of Edinburgh 2019 Abstract A sound-shape systematicity exists between the English pronunciation of letters and the shapes of their characters in the Roman alphabet. This systematicity may contribute to improved outcomes for early readers, language learners, and those with dyslexia. Motivated by these facts, we describe two methods for modifying fonts to increase this systematicity. Applying a simulated annealing algorithm to parametric font coor- dinates resulted in parameterizations that increased the sound-shape systematicity on average by 132% over the default. Training a neural network to generate font glyphs from a set of shape distances did not result in a significant increase in systematicity. We explore the experimental results for relationships that might aid future research into systematicity and font design. These show that thicker strokes, wider charac- ters, and a smaller optical size are correlated with higher sound-shape systematicity. The data also gives evidence of a negative sound-shape correlation in monospaced fonts, but positive sound-shape correlation in proportional-spaced fonts. We introduce a reusable software library to enable additional experiments and a new data set for further research and validation. i Acknowledgements I am grateful for the many enlightening conversations I have enjoyed with Dr. Richard Shillcock. This work could not have been done without his guidance and encour- agement. Thank you to Hana Jee for laying the groundwork for this project and for freely sharing information about her approach. This project is entirely motivated by the groundbreaking work that she, Dr. Shillcock, and Dr. Monica Tamariz have done. I am grateful for Ari Anastassiou’s interest in this project and his feedback on ideas and approaches. The neural network experiments in this work are based on his suggestions, though any failures in their execution are surely mine. Credit goes to Leon Overweel for assistance in finding proper citations for several common software packages. Fi- nally, thank you to my wife Dayna, who has done so much to enable me to complete this work. ii Table of Contents 1 Introduction 1 1.1 Motivation and Objective . 1 1.2 Contributions . 2 1.3 Outline . 3 2 Background: Systematicity 4 2.1 Language . 4 2.2 Learning . 5 2.3 Fonts . 6 3 Rendering Glyphs 8 4 Systematicity in Fonts 11 4.1 Sound and Shape Representation . 11 4.2 Distance Measures . 12 4.3 Correlation and Significance . 15 5 Parametric Font Optimization 16 5.1 Parametric Fonts . 16 5.2 Metaheuristics . 17 5.3 Font Set . 19 5.4 Methodology . 19 5.5 Results . 20 5.6 Parametric Font Glyphs . 24 6 Fonts from Distances Using Neural Networks 31 6.1 Data Set . 31 6.2 Pre-processing . 31 iii 6.3 Training . 32 6.4 Inference Experiments . 32 6.5 Results . 32 7 Discussion 35 7.1 Parametric Fonts . 35 7.2 Neural Networks . 36 7.3 Limitations . 36 7.4 Future Work . 37 7.4.1 Systematicity . 37 7.4.2 Optimization . 38 7.4.3 Other Languages and Phonologies . 38 8 Conclusions 39 Bibliography 40 A List of Parametric Fonts 44 iv Chapter 1 Introduction 1.1 Motivation and Objective Language is full of statistical patterns called systematicity. Our brains make use of these patterns, leveraging them in the learning, production, and comprehension of lan- guage. The neurological mechanisms that accomplish this are not always clear, but the empirical evidence demonstrates the benefits of systematicity (Imai et al., 2008; Kantartzis et al., 2011). One lesser-known aspect of systematicity is a relationship between orthography, the visual shape of written language, and phonology, the sound of spoken language. This systematicity extends to the shapes of individual letters and their attendant sounds. The relationship can be measured in the form of a correlation between the visual and phonological distances between each shape and sound pair. While this systematicity has been known to exist in other languages, it has only recently been shown to exist in limited amounts in the English language (Jee et al., 2018). Since other types of language systematicity are helpful, it may be that increased sound-shape systematicity would also be of benefit. It could provide benefit to early readers or to those who experience dyslexia. Our goal in this project is to explore the possibility of increasing this sound-shape systematicity for a given font. Little, if any, work has been done to explore how this particular type of systematicity may be of benefit. Our hope is that further research will be enabled by the creation of tools for and identifying methods of improving this systematicity. These methods and tools could be used by researchers in linguistics, psychology, and education to explore the benefits of sound-shape systematicity in language. Gains in systematicity should be balanced with the appeal and readability of a font. 1 Chapter 1. Introduction 2 One could imagine substituting the characters of the Roman alphabet with a set of arbi- trary shapes that correlate highly with the variation of sounds in the English language. Such a set of shapes, however, could be unattractive and entirely unrecognizable to readers. On the other hand, the gains in systematicity that may be achievable with tra- ditional Roman characters is likely to be limited by fidelity to these shapes. For these reasons, both readability and systematicity gains must be kept in view. To balance these goals, two approaches were selected to increase sound-shape sys- tematicity. The first approach used a metaheuristic method called simulated annealing to find coordinates for parametric fonts that resulted in higher sound-shape systematic- ity. We chose this approach because it would result in readable and attractive fonts. Gains in systematicity, however, were limited by the constraints of the font design. In the second approach, a neural network was trained to produce glyphs from a set of shape distances. This approach was chosen for its greater potential for sound-shape systematicity gains, albeit at the cost of clarity and readability.. In addition to new methods for increasing systematicity, we expected to find fac- tors that correlate with higher systematicity. Parametric fonts have variation axes with common definitions. This enabled us to compare these commonalities across the re- sulting systematicity measurements. These relationships could be of use to researchers exploring the benefits of sound-shape systematicity and to typographers and font de- signers. 1.2 Contributions To our knowledge, this is among the first work to explore methods for increasing sound-shape systematicity in fonts. We expect our unique contributions to enable fur- ther research in this area. The chief contributions made in this work are:: • A successful demonstration of the simulated annealing metaheuristic to find pa- rameterizations of parametric fonts that result in higher sound-shape systematic- ity. This approach resulted in a mean systematicity increase of 119% over the default parameterizations. • A method for generating glyphs from sizes using a fully-connected feedforward neural network. Our experimental results show that this does not result in fonts with increased sound-shape systematicity. We theorize that the method of train- ing does not allow for generalization beyond the distance distributions in the Chapter 1. Introduction 3 training set. • Empirical results showing font qualities that correlate with higher sound-shape systematicity. Specifically, we have found that font weights and widths are pos- itively correlated and that font optical size is negatively correlated with this sys- tematicity. We have also found that monospaced fonts demonstrate sound-shape anti-correlation, in opposition to proportional-spaced fonts. • A software library1 that can be used for further research into sound-shape sys- tematicity in fonts, including glyph rendering, distance calculations, and system- aticity measurements. • A data set2 of over 85,000 unique glyph sets and their resulting systematicity measurements that can be used for further research and validation. 1.3 Outline The rest of this work is structured as follows. Chapter 2 provides a brief background on systematicity in language, its role in learning, prior work on sound-shape system- aticity, and prior work on fonts and reading. Chapter 3 discusses our work creating a reusable glyph-rendering module and reviews some of the design decisions made. Chapter 4 details our method of measuring sound-shape systematicity and grounds our choices for visual representation and distance measurement. In chapter 5 we dis- cuss the methodology and results of our experiments with parametric fonts. Chapter 6 discusses producing glyphs from shape distances using a neural network. Chapter 7 discusses our findings and its limitations and highlights promising ideas for future work. Chapter 8 provides a brief summary of and conclusion to our work. 1https://github.com/adamdotdev/font-systematicity 2https://doi.org/10.5281/zenodo.3369478 Chapter 2 Background: Systematicity We begin with the background in psychology and linguistics that motivates our work. We first review examples of systematicity in language. We then discuss the effects of systematicity and arbitrariness on learning. Finally, we review prior work done in the area of font design and its impact on learning. 2.1 Language It is well known that systematicity exists between aspects of language. An easily un- derstandable example is the systematicity between syntax and semantics. If a fluent speaker understands the sentence “John chases the cat”, it must entail that they can also understand the sentence “the cat chases John” (Fodor and Pylyshyn, 1988). Like- wise, if a fluent speaker hears “The zorp is broken”, they can easily make sense of or produce sentences like “Please call the zorp repair shop” and the “The zorp has been fixed” even if they have never encountered the word “zorp” before (Hadley, 1994).