Unicode font for new lipi Malayalam script designed by Prof. R K Joshi et al. maintained by Swathanthra Malayalam Computing. Sans-serif font.
ആറ്റിന് വക്കത്തെ മാളികവീട്ടില- ന്നാറ്റുനോറ്റിട്ടൊരുണ്ണി പിറന്നു. ഉണ്ണിക്കരയിലെക്കിങ്ങിണി പൊന്നു കൊണ്ടു- ണ്ണിക്കു കാതില് കുടക്കടുക്കന്. പാപ്പ കൊടുക്കുന്നു പാലു കൊടുക്കുന്നു പാവ കൊടുക്കുന്നു നങ്ങേലി. കാച്ചിയ മോരൊഴിച്ചൊപ്പി വടിച്ചിട്ടു മാനത്തമ്പിളി മാമനെക്കാട്ടീട്ടു കാക്കേ പൂച്ചേ പാട്ടുകള് പാടീട്ടു മാമു കൊടുക്കുന്നു നങ്ങേലി താഴെ വെച്ചാലുറുമ്പരിച്ചാലോ തലയില് വെച്ചാല് പേനരിച്ചാലോ തങ്കക്കുടത്തിനെത്താലോലം പാടീട്ടു തങ്കക്കട്ടിലില് പട്ടു വിരിച്ചിട്ടു തണുതണപ്പൂന്തുട തട്ടിയുറക്കീട്ടു ചാഞ്ഞു മയങ്ങുന്നു നങ്ങേലി.
- പൂതപ്പാട്ട്(ഇടശ്ശേരി)വീണ്ടും കാണുക എന്നൊന്നുണ്ടാവില്ല. നീ മരിച്ചതായി ഞാനും ഞാന് മരിച്ചതായി നീയും കണക്കാക്കുക. ചുംബിച്ച ചുണ്ടുകള്ക്ക് വിടതരിക.
-ലോല (പത്മരാജന്)മലരണിക്കാടുകൾ തിങ്ങിവിങ്ങി, മരതകകാന്തിയിൽ മുങ്ങിമുങ്ങി, കരളും മിഴിയും കവർന്നുമിന്നി കറയറ്റൊരാലസൽ ഗ്രാമഭംഗി പുളകംപോൽ കുന്നിൻപുറത്തുവീണ പുതുമൂടൽമഞ്ഞല പുല്കിനീക്കി, പുലരൊളി മാമലശ്രേണികൾതൻ- പുറകിലായ് വന്നുനിന്നെത്തിനോക്കി. എവിടെത്തിരിഞ്ഞൊന്നു നോക്കിയാലെ- ന്തവിടെല്ലാം പൂത്ത മരങ്ങൾമാത്രം; ഒരു കൊച്ചു കാറ്റെങ്ങാൻ വന്നുപോയാൽ തുരുതുരെപ്പൂമഴയായി പിന്നെ!
-രമണന്(ചങ്ങമ്പുഴ)
തോറ്റകുട്ടി പുറത്തേക്കിറങ്ങി
തോട്ടുവെള്ളത്തില് പുസ്തകം വിട്ടു
കാറ്റിലേക്കു കുടയും കൊടുത്തു.
തുണ്ടുപെന്സിലെറിഞ്ഞു കളഞ്ഞു
കണ്ട കാട്ടു വഴിയില് നടന്നു...
തൊട്ടു മെല്ലെ വിളിച്ചപോല് തോന്നി
തൊട്ടടുത്തു പിറകില് വന്നാരോ
തിത്തിരിപ്പക്ഷി മൂളിയതാകാം
കൊച്ചുതുമ്പയോ മൈനയോ ആവാം
കാട്ടുവള്ളിയില് തൂങ്ങിക്കുതിച്ച്
കാട്ടിലേക്കവന് ചെന്നുപോല് പിന്നെ
പൂത്തമുല്ലതന് സൗരഭം നീന്തും
കാറ്റവനൊരു പാട്ടുപോല് തോന്നി
പൂക്കളൊക്കെയും വാക്കുകള്, പായും
കാട്ടരുവി കളകള ഗാനം
രാത്രി നക്ഷത്ര വിസ്തൃതാകാശം
നീര്ത്തിവച്ചൊരു പുസ്തകമായി
തോറ്റകുട്ടിയെ തോളത്തുവച്ചു.
പൂത്തുനിന്നു മരതകക്കുന്ന്
തോല്ക്കുകില്ല നീയെന്നേ പറഞ്ഞു
കാത്തു നില്ക്കുന്നൊരമ്പിളിത്തെല്ല്...!
കനകച്ചിലങ്ക കിലുങ്ങിക്കിലുങ്ങി,
കാഞ്ചനകാഞ്ചി കുലുങ്ങിക്കുലുങ്ങി
കടമിഴിക്കോണുകളിൽ സ്വപ്നം മയങ്ങി,
കതിരുതിർപ്പൂപ്പുഞ്ചിരി ചെഞ്ചുണ്ടിൽത്തങ്ങി;
ഒഴുകുമുടയാടയിലൊളിയലകൾ ചിന്നി
അഴകൊരുടലാർന്നപോലങ്ങനെ മിന്നി;
മതിമോഹനശുഭനർത്തനമാടുന്നയി, മഹിതേ
മമ മുന്നിൽ നിന്നു നീ മലയാളകവിതേ!
ഒരുപകുതി പ്രജ്ഞയിൽ നിഴലും നിലാവും
ഒരു പകുതി പ്രജ്ഞയിൽ കരിപൂശിയവാവും
ഇടചേർന്നെൻ ഹൃദയം പുതുപുളകങ്ങൾ ചൂടി
ചുടുനെടുവീർപ്പുകൾക്കിടയിലും കൂടി
അതിധന്യകളുഡുകന്യകൾ മണിവീണകൾ മീട്ടി
അപ്സരരമണികൾ കൈമണികൾ കൊട്ടി
വൃന്ദാവനമുരളീരവപശ്ചാത്തലമൊന്നിൽ
സ്പന്ദിക്കുമാമധുരസ്വരവീചികൾ തന്നിൽ
താളം നിരനിരയായ് നുരയിട്ടിട്ടു തങ്ങി
താമരത്താരുകൾപോൽ തത്തീ ലയഭംഗി
സതതസുഖസുലഭതതൻ നിറപറവച്ചു
ഋതുശോഭകൾ നിൻമുന്നിൽ താലം പിടിച്ചു
തങ്കത്തരിവളയിളകി നിൻപിന്നിൽ തരളിതകൾ
സങ്കൽപസുഷമകൾ ചാമരം വീശി
സുരഭിലമൃഗമദതിലകിത ഫാലം
സുമസമ സുലളിത മൃദുലകപോലം
നളിനദല മോഹന നയനവിലാസം
നവകുന്ദസുമസുന്ദര വരമന്ദഹാസം
ഘനനീല വിപിനസമാന സുകേശം
കുനുകുന്തളവലയാങ്കിത കർണ്ണാന്തികദേശം
മണികനക ഭൂഷിത ലളിതഗളനാളം
മമമുന്നിലെന്തൊരു സൌന്ദര്യമേളം
മുനിമാരും നുകരാത്ത സുഖചക്രവാളം
ഉണരുന്നു പുളകിതം മമജീവനാളം
ഇടവിടാതടവികളും ഗുഹകളും ശ്രുതികൊട്ടിയ
ജടതൻ ജ്വരജൽപനമയമായ മായ
മറയുന്നു വിരിയുന്നൂ മമജീവൻ തന്നിൽ
മലരുകൾ മലയാളകവിതേ, നിൻമുന്നിൽ
നിർനിമേഷാക്ഷനായ് നിൽപതഹോ ഞാനിദം
നിൻ നർത്തനമെന്തത്ഭുത മന്ത്രവാദം
കണ്ടുനിൻ കൺകോണുകളുലയവേ കരിവരി-
വണ്ടലയും ചെണ്ടുലയും വനികകൾ ഞാൻ
ലളിതേനിൻ കൈവിരലുകളിളകവേ കണ്ടു ഞാൻ
കിളിപാറും മരതകമരനിരകൾ
കനകോജ്ജ്വല ദീപശിഖാ രേഖാവലിയാലെ
കമനീയ കലാദേവത കണിവച്ചതുപോലെ
കവരുന്നു കവിതേ തവനൃത്തരംഗം
കാപാലികനെങ്കിലും എന്നന്തരംഗം
തവചരണ ചലനകൃത രണിതരസരംഗണം
തന്നോരനുഭൂതിതൻ ലയനവിമാനം
എന്നെ പലദിക്കിലുമെത്തിപ്പൂ ഞാനൊരു
പൊന്നോണപ്പുലരിയായ് പരിലസിപ്പൂ
കരകമലദലയുഗള മൃദുമൃദുലചലനങ്ങൾ
കാണിച്ചസൂക്ഷ്മലോകാന്തരങ്ങൾ
പലതും കടന്നുകടന്നു ഞാൻ പോയി
പരിധൃത പരിണതപരിവേഷനായി
ജന്മം ഞാൻ കണ്ടു ഞാൻ നിർവൃതി കൊണ്ടു
ജന്മാന്തരങ്ങളിലെ സുകൃതാമൃതമുണ്ടു
ആയിരം സ്വർഗ്ഗങ്ങൾ സ്വപ്നവുമായെത്തി
മായികേ നീ നിൻ നടനം നടത്തി
പുഞ്ചിരി പെയ്തുപെയ്താടു നീ ലളിതേ
തുഞ്ചന്റെ തത്തയെ കൊഞ്ചിച്ച കവിതേ
അഞ്ചിക്കുഴഞ്ഞഴിഞ്ഞാടു ഗുണമിളിതേ
കുഞ്ചന്റെ തുള്ളലിൽ മണികൊട്ടിയ കവിതേ
പലമാതിരി പലഭാഷകൾ പലഭൂഷകൾ കെട്ടി
പാടിയുമാടിയും പലചേഷ്ടകൾ കാട്ടി
വിഭ്രമവിഷവിത്തുവിതക്കിലും ഹൃദിമേ
വിസ്മരിക്കില്ല ഞാൻ നിന്നെ സുരസുഷമേ
തവതലമുടിയിൽനിന്നൊരുനാരുപോരും
തരികെന്നെത്തഴുകട്ടെ പെരുമയും പേരും
പോവുന്നൊ നിൻ നൃത്തം നിർത്തി നീ ദേവീ
പോവല്ലെ പോവല്ലെ പോവല്ലെ ദേവീ
20-4-1946
ഒരു വട്ടം കൂടി എന്നോര്മ്മകള് മേയുന്ന തിരുമുറ്റത്തെത്തുവാന് മോഹം
ഒരു വട്ടം കൂടി എന്നോര്മ്മകള് മേയുന്ന തിരുമുറ്റത്തെത്തുവാന് മോഹം
തിരുമുറ്റത്തൊരു കോണില് നില്ക്കുന്നൊരാ
നെല്ലി മരമൊന്നുലുത്തുവാന് മോഹം
മരമൊന്നുലുത്തുവാന് മോഹം
അടരുന്ന കായ് മണികള് പൊഴിയുമ്പോള്
ചെന്നെടുത്തു അതിലൊന്നു തിന്നുവാന് മോഹം
സുഖമെഴും കയ്പും പുളിപ്പും മധുരവും നുകരുവാന് ഇപ്പോഴും മോഹം
തൊടിയിലെ കിണര് വെള്ളം കോരിക്കുടിച്ചെന്തു മധുരമെന്നോതുവാന് മോഹം
എന്ത് മധുരമെന്നോതുവാന് മോഹം
ഒരു വട്ടം കൂടി ആ പുഴയുടെ തീരത്തു വെറുതെയിരിയ്ക്കുവാന് മോഹം
ഒരു വട്ടം കൂടി ആ പുഴയുടെ തീരത്തു വെറുതെയിരിയ്ക്കുവാന് മോഹം
വെറുതെയിരുന്നൊരു കുയിലിന്റെ പാട്ടു കേട്ട് എതിര് പാട്ടു പാടുവാന് മോഹം
എതിര് പാട്ടു പാടുവാന് മോഹം
അതു കേള്ക്കേ ഉച്ചത്തില് കൂകും കുയിലിന്റെ ശ്രുതി പിന്തുടരുവാന് മോഹം
ഒടുവില് പിണങ്ങി പറന്നു പോം പക്ഷിയോട് അരുതേ എന്നോതുവാന് മോഹം
വെറുതേ ഈ മോഹങ്ങള് എന്നറിയുമ്പോഴും വെറുതേ മോഹിക്കുവാന് മോഹം
വെറുതേ ഈ മോഹങ്ങള് എന്നറിയുമ്പോഴും വെറുതേ മോഹിക്കുവാന്
വെറുതേ മോഹിക്കുവാന് മോഹം
Grumpy wizards make toxic brew for the evil Queen and Jack.The quick brown fox jumps over the lazy dog.
Swathanthra Malayalam Computing (SMC) is a free software collective engaged in development, localization, standardization and popularization of various Free and Open Source Softwares in Malayalam language. "എന്റെ കമ്പ്യൂട്ടറിനു് എന്റെ ഭാഷ" is the slogan of the organization, which translates to "My language for/on My Computer".
SMC has been active since October 2002 and has been working to provide Malayalam language tools that work on all layers of computing including and not limited to rendering fixes, fonts, input mechanisms, translations (localization), text-to-speech engines, dictionaries, spell checkers and other indic script based language computing specific tools across operating systems. We are the upstream for Malayalam fonts and tools for popular GNU/Linux based operating systems such as Fedora and Debian. We also maintain localizations for popular Free Software Desktops (GNOME/KDE), popular applications such as Firefox and Libre Office.
SMC is perhaps the largest language technology developer community in India and collaborates very closely with government and industry, and serves as an advisory to govermental/semi-govermental organizations that determine the future of Malayalam language on computing devices. We are not just developers though, we also have linguists, journalists, Wikipedians, writers and all sorts of language users among us.
SMC also works on developing accessibility support for indic languages and maintains Dhvani TTS which supports 11 languages . Over the years, SMC has evolved to accommodate developers focused on Indic script based languages and now provides a generic web based Indic language computation framework called SILPA.
ൎത ൎങ്ക ൎക്ക ൎച ൎച്ച ൎച്ഛ ൎജ്ജ ൎട്ട ൎഡ്ഡ ൎഡ്ഢ ൎണ്ണ ൎത്ത ൎത്ഥ ൎഥ ൎദ ൎദ്ധ ൎന ൎന്ന ൎത്ന ൎന്ത ൎന്ദ ൎഞ്ച ൎണ്ട ൎണ്ടു ൎണ്ടൂ ൎഞ്ചു ൎഞ്ചൂ ൎപ ൎപ്പ ൎഫ ൎബ ൎബ്ബ ൎമ്പ ൎമ്പു ൎയ ൎയ്യ ൎത്ഥ് ൎര ൎല ൎല്ല ൎവ ൎവ്വ ൎശ്ശ ൎശ ൎഹ ൎക്ഷ ൎക്ഷു ൎക്ഷൂ ൎക്ഷ
fonts-smc-raghumalayalamsans-2.2.1/tests/tests.txt 0000664 0000000 0000000 00000013156 13603123106 0022343 0 ustar 00root root 0000000 0000000 Arabic Numerals 0 1 2 3 4 5 6 7 8 9 -------------------- Malayalam Numerals ൦ ൧ ൨ ൩ ൪ ൫ ൬ ൭ ൮ ൯ -------------------- Malayalam numbers 10 ൰ 100 ൱ 1000 ൲ Quarter ൳ Half ൴ ThreeQuarter ൵ -------------------- Date Marks 10൹ 10-ാം 6 ാം -------------------- എടാാാാ എടാാാാാാാാ ാ ി ു 1-ാം, 1-ാമത്തെ, 1ാം, 1ാമത്തെ -------------------- Dotreph ൎ + various glyphs ൎഠ ൎപ ൎത ൎവ അഥൎവ്വം തീൎത്ഥം തീൎത്ഥ് ചൎക്ക നിൎഗ്ഗളം വൎത്തുളം ചൎച്ച ചൎച്ച് മാൎച്ച് മാൎത്ത ഭാൎയ ഭാൎയ്യ ദുൎഗ്ഗുണം അൎദ്ധവൃത്തം നിൎലോഭം നിൎല്ലോഭം ഉൎവശി ഉൎവ്വശി തൎജമ തൎജ്ജമ സൂൎയന് സൂൎയ്യന് അൎജ്ജുനന് മാൎജ്ജാരന് -------------------- Rendering glyphs with r4 ( ്ര) പ്ര ഥ്ര ഖ്ര ക്സ്ര ന്റ്ര ബ്ര പ്പ്ര സ്പ്ര സ്പ്രി സ്പ്രേ ഗ്ദ്ധ്രോ ക്ത്ര സബ്ഗ്രൂപ്പ് മുഖ്യമന്ത്രി സ്വാതന്ത്ര്യം പ്രസിഡന്റ് മഞ്ഞപ്പ്രസാദം സാമ്രാജ്യം വൈസ്രോയി അബ്സ്റ്റ്രാക്റ്റ് -------------------- ഒന്നു് ചര്ച്ചയ്ക്കു് ചര്ച്ചയ്ക്ക് യൗവനം ഔഷധം കൌമുദി സ്വപ്നം -------------------- ആന്റണി ആന്റി ആന്റീ എന്റുപ്പാപ്പ എന്റെ വിന്റേജ് ആന്റോ പാന്റ് ഹെന്റി എന്റിക്കലെക്സി -------------------- കാറ്റ് മുറ്റത്ത് കാറ്റാടി വറ്റില്ല അറ്റുപോയി ഏറ്റെടുത്തു മാറ്റൊലി ലക്ചററോട് ലാറ്ററൈറ്റ്മണ്ണ് -------------------- ക്സ ബ്സ ബ്സു ക്ത ക്കു ക്കൂ യ്ക യ്ക്ക യ്ക്കു യ്ക്കൂ യ്ത യ്ക്കു യ്ത്ത യ്ത്തു യ്ന യ്നു ല്ക ല്ക്ക ല്ക്കു ല്തു ല്ത്തൂ ല്പ ല്പു ഷ്ക്ക ഷ്ക്കു ഷ്ഠൂ ഴ്വ ഭൄ ഥൃ ശ്ന വ്ശ ശ്ക ശ്ക്ക ശ്ദ ശ്പ ശ്ബ ദ്ഗ ദ്ന ദ്ല ദ്ബ ദ്മ സ്ഗ സ്ഹ ഹ്ത പ്ത പ്തു സ്പ്ലേ കയ്പ് കയ്പ്പ് ആഴ്ച്ച ആഴ്ച അജ്മീര് പച്ചപ്പയ്യ് കല്ല് ഉവ്വ് കുറ്റ്യാടി വയ്യ യ്യു വ്വു വ്വൂ യ്യൂ ല്ലു ല്ലൂ എല്ലായ്പ്പോഴും -------------------- 'എനിയ്ക്ക്' "പപ്പയുടെ സ്വന്തം അപ്പൂസ്" "അവനി വാഴ്വ് കിനാവ്" "അവള്ക്ക്" -------------------- പറയ്വോ? പോയ്വര്വോ? -------------------- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum ഒരാൾ സ്വയം ജീവിതം അവസാനം സത്യം ഇവര് അവള് മീന് ജപം തറ ആന പീപ്പി അപ്പൂസ് ജര്മനി മലയാളം ഇനം മതം ഇഗ്വാന കാവ്യ സന്താപം സൈസ് അഛന് മഴ അറ കൌമ വാഴ്വ് സ്വപ്നം കിനാവ് വിജയം ജനിതകഘടനയില് അങ്ങാടി മാങ്ങാപ്പഴം ഓടീ മെയിലിങ് ധനാഗമനമാര്ഗങ്ങള് അധ്യാപകന് സംസ്കാരം) “And not only the labourers but also the classes directly or indirectly exploiting the labourers are made subject, through the division of labour, to the tool of their function: the empty-minded bourgeois to his own capital and his own insane craving for profits; the lawyer to his fossilised legal conceptions, which dominate him as an independent power; the 'educated classes' in general to their manifold species of local narrow -mindedness and one-sidedness, to their own physical and mental short -sightedness, to their stunted growth due to their narrow specialised education and their being chained for life to this specialised activity even when this specialised activity is merely to do nothing.” എന്ന് ഏംഗല്സ് നൂറു വര്ഷം മുമ്പേ Anti-Duhring(1876)ല് പറഞ്ഞുവെച്ചതാണ്. എല്ലാ അറിവുകളും വിരല്ചൂണ്ടുന്നത് പ്രവൃത്തിയിലേയ്ക്കാണ്. fonts-smc-raghumalayalamsans-2.2.1/tools/ 0000775 0000000 0000000 00000000000 13603123106 0020430 5 ustar 00root root 0000000 0000000 fonts-smc-raghumalayalamsans-2.2.1/tools/artifacts.sh 0000664 0000000 0000000 00000001373 13603123106 0022750 0 ustar 00root root 0000000 0000000 cp *.conf build cd build rm -rf ttf otf woff woff2 *.pdf mkdir ttf woff woff2 cp *.ttf ttf cp *.woff woff cp *.woff2 woff2 tar cvf ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz *.conf ttf sha256sum ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz > ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz.sha256 md5sum ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz > ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz.md5 zip -j ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip ttf/* ln -s ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz ./${CI_PROJECT_NAME}_LATEST.tar.gz ln -s ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz.sha256 ./${CI_PROJECT_NAME}_LATEST.tar.gz.sha256 ln -s ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz.md5 ./${CI_PROJECT_NAME}_LATEST.tar.gz.md5 rm -rf ttf otf woff woff2 *.pdf rm *.conf fonts-smc-raghumalayalamsans-2.2.1/tools/build.py 0000664 0000000 0000000 00000014470 13603123106 0022107 0 ustar 00root root 0000000 0000000 #!/usr/bin/python # coding=utf-8 # # Font build utility # import sys import time import os import fontforge import psMat from tempfile import mkstemp from fontTools.ttLib import TTFont from fontTools.ttx import makeOutputFileName import argparse def flattenNestedReferences(font, ref, new_transform=(1, 0, 0, 1, 0, 0)): """Flattens nested references by replacing them with the ultimate reference and applying any transformation matrices involved, so that the final font has only simple composite glyphs. This to work around what seems to be an Apple bug that results in ignoring transformation matrix of nested references.""" name = ref[0] transform = ref[1] glyph = font[name] new_ref = [] if glyph.references and glyph.foreground.isEmpty(): for nested_ref in glyph.references: for i in flattenNestedReferences(font, nested_ref, transform): matrix = psMat.compose(i[1], new_transform) new_ref.append((i[0], matrix)) else: matrix = psMat.compose(transform, new_transform) new_ref.append((name, matrix)) return new_ref def validateGlyphs(font): """Fixes some common FontForge validation warnings, currently handles: * wrong direction * flipped references In addition to flattening nested references.""" wrong_dir = 0x8 flipped_ref = 0x10 for glyph in font.glyphs(): state = glyph.validate(True) refs = [] if state & flipped_ref: glyph.unlinkRef() glyph.correctDirection() if state & wrong_dir: glyph.correctDirection() for ref in glyph.references: for i in flattenNestedReferences(font, ref): refs.append(i) if refs: glyph.references = refs glyph.round() # Hack, OTS rejects ligature carets! glyph.lcarets = () def fixGasp(font, value=15): try: table = font.get('gasp') table.gaspRange[65535] = value except: print('ER: {}: no table gasp') def fixXAvgCharWidth(font): """xAvgCharWidth should be the average of all glyph widths in the font""" width_sum = 0 count = 0 for glyph_id in font['glyf'].glyphs: width = font['hmtx'].metrics[glyph_id][0] if width > 0: count += 1 width_sum += width if count == 0: fb.error("CRITICAL: Found no glyph width data!") else: expected_value = int(round(width_sum) / count) font['OS/2'].xAvgCharWidth = int(round(width_sum) / count) def opentype(infont, outdir, type, feature, version): font = fontforge.open(infont) if args.type == 'otf': outfont = infont.replace(".sfd", ".otf") flags = ("opentype", "round", "omit-instructions", "dummy-dsig") else: outfont = infont.replace(".sfd", ".ttf") flags = ("opentype", "round", "omit-instructions", "dummy-dsig") outfont = os.path.join(outdir, outfont) print("Generating %s => %s" % (infont, outfont)) tmpfont = mkstemp(suffix=os.path.basename(outfont))[1] # Remove all GSUB lookups for lookup in font.gsub_lookups: font.removeLookup(lookup) # Remove all GPOS lookups for lookup in font.gpos_lookups: font.removeLookup(lookup) # Merge the new featurefile font.mergeFeature(feature) font.version = version font.appendSFNTName('English (US)', 'Version', 'Version ' + version + '.0+' + time.strftime('%Y%m%d')) font.selection.all() font.correctReferences() font.simplify() font.selection.none() # fix some common font issues validateGlyphs(font) font.generate(tmpfont, flags=flags) font.close() # now open in fontTools font = TTFont(tmpfont, recalcBBoxes=0) # our 'name' table is a bit bulky, and of almost no use in for web fonts, # so we strip all unnecessary entries. name = font['name'] names = [] for record in name.names: platID = record.platformID langID = record.langID nameID = record.nameID # we keep only en_US entries in Windows and Mac platform id, every # thing else is dropped if (platID == 1 and langID == 0) or (platID == 3 and langID == 1033): if nameID == 13: # the full OFL text is too much, replace it with a simple # string if platID == 3: # MS strings are UTF-16 encoded text = 'OFL v1.1'.encode('utf_16_be') else: text = 'OFL v1.1' record.string = text names.append(record) # keep every thing else except Descriptor, Sample Text elif nameID not in (10, 19): names.append(record) name.names = names font['OS/2'].version = 4 # https://www.microsoft.com/typography/otspec/os2.htm#fst font['OS/2'].fsType = 0 if args.type == 'ttf': fixGasp(font) fixXAvgCharWidth(font) # FFTM is FontForge specific, remove it del(font['FFTM']) # force compiling GPOS/GSUB tables by fontTools, saves few tens of KBs # for tag in ('GPOS', 'GSUB'): # font[tag].compile(font) font.save(outfont) font.close() os.remove(tmpfont) def webfonts(infont, type): font = TTFont(infont, recalcBBoxes=0) # Generate WOFF2 woffFileName = makeOutputFileName(infont, outputDir=None, extension='.' + type) print("Processing %s => %s" % (infont, woffFileName)) font.flavor = type font.save(woffFileName, reorderTables=False) font.close() if __name__ == "__main__": parser = argparse.ArgumentParser(description='Build fonts') parser.add_argument('-i', '--input', help='Input font', required=True) parser.add_argument('-v', '--version', help='Version') parser.add_argument('-f', '--feature', help='Feature file') parser.add_argument('-t', '--type', help='Output type', default='otf') parser.add_argument('-o', '--outdir', help='Output directory', default='build') args = parser.parse_args() if not os.path.exists(args.outdir): os.mkdir(args.outdir) if args.type == 'otf' or args.type == 'ttf': opentype(args.input, args.outdir, args.type, args.feature, args.version) if args.type == 'woff' or args.type == 'woff2': webfonts(args.input, args.type) fonts-smc-raghumalayalamsans-2.2.1/tools/requirements.txt 0000664 0000000 0000000 00000000107 13603123106 0023712 0 ustar 00root root 0000000 0000000 git+https://github.com/google/brotli@v0.3.0#egg=Brotli fonttools >= 3.0