எழுத்துருக் குடும்பம்
தேர்ந்தெடுத்த எழுத்துக்கு எழுத்துருக் குடும்பத்தைப் பயன்படுத்துகிறது. வரம்பு தேர்ந்தெடுக்கப்பட்டால் அந்த வரம்பு மட்டும் மாறும்; caret மட்டும் இருந்தால் தற்போதைய பத்தியின் எழுத்திற்குப் பொருந்தும். உண்மையான எழுத்துருக் கோப்புகளையும் font-family மதிப்புகளையும் சேவை CSS தீர்மானிக்கிறது.
இயல்புநிலைக் குடும்பங்கள் sans, serif, mono, cursive ஆகும். பல மொழி உள்ளடக்கத்தைச் சேர்க்கும் சேவைகளில் ஒவ்வொரு குடும்பமும் எந்த எழுத்துருக்களைப் பயன்படுத்தும் என்பதைத் தெளிவாக முடிவு செய்வது நல்லது.
npm install nabi-noteimport {
createNabiWith, mountSurface, mountToolbar, mountContextToolbar,
mountHints, watchSettle, typefaceWing, fontSizeWing, dropCapWing,
mountViewTools,
} from 'nabi-note'
const selected = [
typefaceWing,
fontSizeWing,
dropCapWing,
]
const { nabi, registry } = createNabiWith(selected)
const root = document.querySelector('.nabi')!
const content = document.querySelector('.nabi-content')!
// The locale also sets the direction — Arabic and Urdu run right to left
mountSurface({ nabi, registry, root: content, locale: 'ta' })
const settle = watchSettle(document, { surface: content })
const shared = { nabi, registry, surface: content, settle, locale: 'ta' }
const toolbar = mountToolbar({ ...shared, root: document.querySelector('#toolbar')! })
const context = mountContextToolbar({ ...shared, root: document.querySelector('#context')! })
mountHints({ toolbar, context, root, surface: content })
// The preview and fullscreen buttons — they stand their own box at the end of the row
mountViewTools({ ...shared, root, container: document.querySelector('#toolbar')! })
// on every change — hook up your own code here
// nabi.onChange(() => user_callback(nabi.getHtml()))const selected = wings().use('tf', {
values: ['sans', 'serif', 'mono'],
}).build()values ஐ விடுத்தால் எல்லா இயல்புநிலைக் குடும்பங்களும் பயன்படுத்தப்படும். values இல் உள்ள மதிப்புகள் மட்டுமே ஆவணங்களில் அனுமதிக்கப்படும்.
CSS பாணிகள்
ஆவணம் குடும்பப் பெயரை மட்டுமே சேமிக்கிறது; எழுத்துருக் கோப்புகளை CSS தேர்ந்தெடுக்கிறது. தொகுப்பி மற்றும் வெளியீட்டுப் பக்கம் இரண்டிற்கும் ஒரே container-இல் மாறிகளை மாற்றவும்.
.nabi-content {
--nabi-font-serif: "Noto Serif KR", serif;
--nabi-font-mono: "JetBrains Mono", monospace;
}வலை எழுத்துருக்களைப் பயன்படுத்தினால், அவற்றின் கோப்புகளையும் முதலில் ஏற்ற வேண்டும். பல மொழிகளுக்குத் தேவையான எழுத்துகளைக் கொண்ட cursive எழுத்துருக்கள் பெரும்பாலும் இருக்காது; எனவே சேவையில் உண்மையில் பயன்படுத்தும் எழுத்துருவைத் தேர்ந்தெடுத்த பிறகே அதை வழங்குவது நல்லது.