diff --git a/src/core/annotation.js b/src/core/annotation.js index 542fdc5c5..615b049c0 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -2706,7 +2706,7 @@ class ChoiceWidgetAnnotation extends WidgetAnnotation { let lineWidth = -1; let value; for (const { displayValue } of this.data.options) { - const width = this._getTextWidth(displayValue); + const width = this._getTextWidth(displayValue, font); if (width > lineWidth) { lineWidth = width; value = displayValue; diff --git a/src/shared/scripting_utils.js b/src/shared/scripting_utils.js index 48e04d775..643922051 100644 --- a/src/shared/scripting_utils.js +++ b/src/shared/scripting_utils.js @@ -70,7 +70,8 @@ class ColorConverters { } static CMYK_HTML(components) { - return this.RGB_HTML(this.CMYK_RGB(components)); + const rgb = this.CMYK_RGB(components).slice(1); + return this.RGB_HTML(rgb); } static RGB_CMYK([r, g, b]) { diff --git a/web/debugger.js b/web/debugger.js index 1d5571007..5bc6bdf95 100644 --- a/web/debugger.js +++ b/web/debugger.js @@ -117,7 +117,7 @@ const FontInspector = (function FontInspectorClosure() { download.href = url[1]; } else if (fontObj.data) { download.href = URL.createObjectURL( - new Blob([fontObj.data], { type: fontObj.mimeType }) + new Blob([fontObj.data], { type: fontObj.mimetype }) ); } download.textContent = "Download";