mirror of
https://github.com/qishibo/AnotherRedisDesktopManager.git
synced 2026-01-25 16:46:32 +00:00
16 lines
404 B
JavaScript
16 lines
404 B
JavaScript
const { ipcMain } = require('electron');
|
|
|
|
ipcMain.on('get-all-fonts', (event, arg) => {
|
|
console.log('main, get-all-fonts...');
|
|
|
|
try {
|
|
require('font-manager').getAvailableFonts((fonts) => {
|
|
event.sender.send('send-all-fonts', fonts);
|
|
});
|
|
}
|
|
catch (e) {
|
|
console.log('main.js get fonts failed...', e);
|
|
event.sender.send('send-all-fonts', [{family: "Default Initial"}]);
|
|
}
|
|
});
|