(text, rect, font)
| 4012 | } |
| 4013 | |
| 4014 | function _fitSingleLineFontSize(text, rect, font) { |
| 4015 | let size = Math.min(12, rect.height - 4); |
| 4016 | size = Math.max(size, 6); |
| 4017 | |
| 4018 | while (size > 6) { |
| 4019 | const width = font.widthOfTextAtSize(text, size); |
| 4020 | if (width <= rect.width - 4) return size; |
| 4021 | size -= 0.5; |
| 4022 | } |
| 4023 | |
| 4024 | return 6; |
| 4025 | } |
| 4026 | |
| 4027 | function _drawCheckBox(page, field, rect, zapf) { |
| 4028 | let checked = false; |
no outgoing calls
no test coverage detected