文件
mynode/packages/app-mobile/web/rnVectorIconsSetup.js
chen 301194963b
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
feat: Initial clean release of CHM
2026-11-04 11:29:39 +08:00

43 行
1.5 KiB
JavaScript

import fontAwesomeSolidFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Solid.ttf';
import fontAwesomeRegularFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Regular.ttf';
import fontAwesomeBrandsFont from '@react-native-vector-icons/fontawesome5/fonts/FontAwesome5_Brands.ttf';
import ioniconFont from '@react-native-vector-icons/ionicons/fonts/Ionicons.ttf';
import materialCommunityIconsFont from '@react-native-vector-icons/material-icons/fonts/MaterialIcons.ttf';
import materialIconsFont from '@react-native-vector-icons/material-design-icons/fonts/MaterialDesignIcons.ttf';
// See https://www.npmjs.com/package/react-native-vector-icons
const setUpRnVectorIcons = () => {
const iconFontStyles = `
@font-face {
src: url(${fontAwesomeSolidFont});
font-family: FontAwesome5Free-Solid;
}
@font-face {
src: url(${fontAwesomeRegularFont});
font-family: FontAwesome5Free-Regular;
}
@font-face {
src: url(${fontAwesomeBrandsFont});
font-family: FontAwesome5Brands-Regular;
}
@font-face {
src: url(${ioniconFont});
font-family: Ionicons;
}
@font-face {
src: url(${materialCommunityIconsFont});
font-family: MaterialCommunityIcons;
}
@font-face {
src: url(${materialIconsFont});
font-family: MaterialDesignIcons;
}
`;
const style = document.createElement('style');
style.appendChild(document.createTextNode(iconFontStyles));
document.head.appendChild(style);
};
setUpRnVectorIcons();