Forum Discussion
JSON to change font from Times to anything else - Syntax??
Drogon365 I have used below JSON & it is working fine for me.
Example:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "https://google.com/"
},
"style": {
"font-family": "Segoe UI"
}
}
Output:
Try using similar JSON styles & let me know if it works for you.
Also, are you using column formatting as well as view formatting in the same list?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
ganeshsanap That didn't work for me. I used:
- ganeshsanapNov 17, 2021MVP
Drogon365 Try copy pasting below JSON as it is & let me know if it works for you:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "a", "txtContent": "@currentField", "style": { "font-family": "Segoe UI", "font-size": "12px" }, "attributes": { "iconName": "Mail", "href": { "operator": "+", "operands": [ "mailto:", "@currentField" ] } } } ] }Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.