()
| 104 | } |
| 105 | |
| 106 | public void dWriteUseSystemRenderingParams() { |
| 107 | Typeface jbMono = FontMgr.getDefault().makeFromFile("fonts/JetBrainsMono-Regular.ttf", 0); |
| 108 | Font font = new Font(jbMono, 14); |
| 109 | |
| 110 | try (Bitmap a = new Bitmap(); |
| 111 | Paint p = new Paint();) |
| 112 | { |
| 113 | a.allocN32Pixels(10, 20); |
| 114 | try(Canvas canvas = new Canvas(a)) { |
| 115 | assertDoesNotThrow(() -> { |
| 116 | FontMgr.useSystemRenderingParams(true); |
| 117 | canvas.drawString("Test1", 0, 10, font, p); |
| 118 | FontMgr.useSystemRenderingParams(false); |
| 119 | canvas.drawString("Test2", 0, 20, font, p); |
| 120 | } |
| 121 | ); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | font.close(); |
| 126 | jbMono.close(); |
| 127 | } |
| 128 | } |
nothing calls this directly
no test coverage detected