|  | @@ -2002,7 +2002,7 @@ float nvgText(struct NVGcontext* ctx, float x, float y, const char* string, cons | 
														
													
														
															
																|  |  | return iter.x; |  |  | return iter.x; | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | float nvgTextBox(struct NVGcontext* ctx, float x, float y, float width, const char* string, const char* end) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | void nvgTextBox(struct NVGcontext* ctx, float x, float y, float width, const char* string, const char* end) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | struct NVGstate* state = nvg__getState(ctx); |  |  | struct NVGstate* state = nvg__getState(ctx); | 
														
													
														
															
																|  |  | struct NVGtextRow rows[2]; |  |  | struct NVGtextRow rows[2]; | 
														
													
												
													
														
															
																|  | @@ -2012,7 +2012,7 @@ float nvgTextBox(struct NVGcontext* ctx, float x, float y, float width, const ch | 
														
													
														
															
																|  |  | int valign = state->textAlign & (NVG_ALIGN_TOP | NVG_ALIGN_MIDDLE | NVG_ALIGN_BOTTOM | NVG_ALIGN_BASELINE); |  |  | int valign = state->textAlign & (NVG_ALIGN_TOP | NVG_ALIGN_MIDDLE | NVG_ALIGN_BOTTOM | NVG_ALIGN_BASELINE); | 
														
													
														
															
																|  |  | float lineh = 0; |  |  | float lineh = 0; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (state->fontId == FONS_INVALID) return x; |  |  |  | 
														
													
														
															
																|  |  |  |  |  | if (state->fontId == FONS_INVALID) return; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | nvgTextMetrics(ctx, NULL, NULL, &lineh); |  |  | nvgTextMetrics(ctx, NULL, NULL, &lineh); | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
												
													
														
															
																|  | @@ -2033,8 +2033,6 @@ float nvgTextBox(struct NVGcontext* ctx, float x, float y, float width, const ch | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | state->textAlign = oldAlign; |  |  | state->textAlign = oldAlign; | 
														
													
														
															
																|  |  | 
 |  |  |  | 
														
													
														
															
																|  |  | return 0; // TODO |  |  |  | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | int nvgTextGlyphPositions(struct NVGcontext* ctx, const char* string, const char* end, float x, float y, struct NVGglyphPosition* positions, int maxPositions) |  |  | int nvgTextGlyphPositions(struct NVGcontext* ctx, const char* string, const char* end, float x, float y, struct NVGglyphPosition* positions, int maxPositions) | 
														
													
												
													
														
															
																|  | @@ -2053,6 +2051,8 @@ int nvgTextGlyphPositions(struct NVGcontext* ctx, const char* string, const char | 
														
													
														
															
																|  |  | if (string == end) |  |  | if (string == end) | 
														
													
														
															
																|  |  | return 0; |  |  | return 0; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | // TODO: should use scaled text to better match with rendering. | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | fonsSetSize(ctx->fs, state->fontSize); |  |  | fonsSetSize(ctx->fs, state->fontSize); | 
														
													
														
															
																|  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); |  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); | 
														
													
														
															
																|  |  | fonsSetBlur(ctx->fs, state->fontBlur); |  |  | fonsSetBlur(ctx->fs, state->fontBlur); | 
														
													
												
													
														
															
																|  | @@ -2104,6 +2104,8 @@ int nvgTextBreakLines(struct NVGcontext* ctx, const char* string, const char* en | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (string == end) return 0; |  |  | if (string == end) return 0; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | // TODO: should use scaled text to better match with rendering. | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | fonsSetSize(ctx->fs, state->fontSize); |  |  | fonsSetSize(ctx->fs, state->fontSize); | 
														
													
														
															
																|  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); |  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); | 
														
													
														
															
																|  |  | fonsSetBlur(ctx->fs, state->fontBlur); |  |  | fonsSetBlur(ctx->fs, state->fontBlur); | 
														
													
												
													
														
															
																|  | @@ -2242,6 +2244,8 @@ float nvgTextBounds(struct NVGcontext* ctx, const char* string, const char* end, | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (state->fontId == FONS_INVALID) return 0; |  |  | if (state->fontId == FONS_INVALID) return 0; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | // TODO: should use scaled text to better match with rendering. | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | fonsSetSize(ctx->fs, state->fontSize); |  |  | fonsSetSize(ctx->fs, state->fontSize); | 
														
													
														
															
																|  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); |  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); | 
														
													
														
															
																|  |  | fonsSetBlur(ctx->fs, state->fontBlur); |  |  | fonsSetBlur(ctx->fs, state->fontBlur); | 
														
													
												
													
														
															
																|  | @@ -2257,6 +2261,8 @@ void nvgTextMetrics(struct NVGcontext* ctx, float* ascender, float* descender, f | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | if (state->fontId == FONS_INVALID) return; |  |  | if (state->fontId == FONS_INVALID) return; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | // TODO: should use scaled text to better match with rendering. | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | fonsSetSize(ctx->fs, state->fontSize); |  |  | fonsSetSize(ctx->fs, state->fontSize); | 
														
													
														
															
																|  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); |  |  | fonsSetSpacing(ctx->fs, state->letterSpacing); | 
														
													
														
															
																|  |  | fonsSetBlur(ctx->fs, state->fontBlur); |  |  | fonsSetBlur(ctx->fs, state->fontBlur); | 
														
													
												
													
														
															
																|  | 
 |