收藏
回答

Can I set font in input textbox

问题模块 框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
API和组件 小程序 需求 input 客户端 6.7.3 2.4.2

- 需求的场景描述(希望解决的问题)


- 希望提供的能力


I try to load fontface to set font style in input component but it does't change.

The question it , change font to use fontface had allow in miniprogram ?

最后一次编辑于  2018-12-27  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

2 个回答

  • 卢霄霄
    卢霄霄
    2018-12-27

    The official API in English did not mention this....


    https://developers.weixin.qq.com/miniprogram/dev/api/wx.loadFontFace.html

    canvas等原生组件不支持使用接口添加的字体


    wx.loadFontFace is invalid when use the native component


    2018-12-27
    赞同 1
    回复 2
    • 黎😄
      黎😄
      2018-12-28

      666

      2018-12-28
      回复
    • 微云
      微云
      2018-12-29

      six six six

      2018-12-29
      回复
  • อ้นนันดา เอเวอริงแฮม
    อ้นนันดา เอเวอริงแฮม
    2018-12-27

    The ploblem is , other text in page has to be a font I have loaded by wx.loadFontFace. There is only in Input component not change .

    2018-12-27
    赞同
    回复 2
    • 卢霄霄
      卢霄霄
      2018-12-27

      Input component is native component.The native components include camera,canvas,input,live-player,live-pusher,map,textarea,video.The document in English is not complete.Sorry for that...

      2018-12-27
      回复
    • 卢霄霄
      卢霄霄
      2018-12-27

      Bug & Tip

      1. bug : For WeChat version 6.3.30, focus attribute settings are invalid;

      2. bug : For WeChat version 6.3.30, placeholder encounters a ghosting problem when focusing;

      3. tip : The input component is a native component, and the font is a system font, so a font-family cannot be set;

      4. tip : When the input is focusing, avoid using css animation;

      5. tip : For cases in which input is packaged in a custom component and from is outside of the custom component, form will not be able to get the input value in this custom component. Under these circumstances, you will need to use the custom component's built-in behaviors wx://form-field.


      2018-12-27
      回复