我正在尝试初始化方形付款表单并更改输入字段的字体。当使用像serif这样的浏览器默认设置时,这个argements会正确呈现,但是当尝试使用Google字体时,我会收到以下错误:
<form>
Uncaught Error: Invalid InputStyle value `Roboto` for property `fontFamily`.
See: https://docs.connect.squareup.com/articles/adding-payment-form/#stylingcardform
at Object.styleStringForKeyValuePair (https://connect.squareup.com/v2/iframe?type=cardNumber:31:30543)
at Object.<anonymous> (https://connect.squareup.com/v2/iframe?type=cardNumber:31:29754)
at Array.forEach (native)
at Object.styleStringForStyleObject (https://connect.squareup.com/v2/iframe?type=cardNumber:31:29677)
at Object.buildStylesForScreenWidth (https://connect.squareup.com/v2/iframe?type=cardNumber:31:29578)
at s.buildStylesForScreenWidth (https://connect.squareup.com/v2/iframe?type=cardNumber:31:16470)
at new s (https://connect.squareup.com/v2/iframe?type=cardNumber:31:15723)
at s (https://connect.squareup.com/v2/iframe?type=cardNumber:31:9536)
at r (https://connect.squareup.com/v2/iframe?type=cardNumber:31:9919)
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
代码模板来自https://docs.connect.squareup.com/articles/adding-payment-form
是否可以使用导入的字体作为输入样式?
答案 0 :(得分:1)
目前您无法在付款方式中使用自定义字体。这是Square正在研究的问题,尤其是Google字体。