* Get the font metrics for a given size.
(size)
| 3780 | */ |
| 3781 | |
| 3782 | function getGlobalMetrics(size) { |
| 3783 | var sizeIndex; |
| 3784 | |
| 3785 | if (size >= 5) { |
| 3786 | sizeIndex = 0; |
| 3787 | } else if (size >= 3) { |
| 3788 | sizeIndex = 1; |
| 3789 | } else { |
| 3790 | sizeIndex = 2; |
| 3791 | } |
| 3792 | |
| 3793 | if (!fontMetricsBySizeIndex[sizeIndex]) { |
| 3794 | var metrics = fontMetricsBySizeIndex[sizeIndex] = { |
| 3795 | cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18 |
| 3796 | }; |
| 3797 | |
| 3798 | for (var key in sigmasAndXis) { |
| 3799 | if (sigmasAndXis.hasOwnProperty(key)) { |
| 3800 | metrics[key] = sigmasAndXis[key][sizeIndex]; |
| 3801 | } |
| 3802 | } |
| 3803 | } |
| 3804 | |
| 3805 | return fontMetricsBySizeIndex[sizeIndex]; |
| 3806 | } |
| 3807 | // CONCATENATED MODULE: ./src/symbols.js |
| 3808 | /** |
| 3809 | * This file holds a list of all no-argument functions and single-character |