74 changes: 74 additions & 0 deletions src/silpa/modules/webfonts/font/Navilu.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/silpa/modules/webfonts/font/Navilu.ttf
Binary file not shown.
Binary file added src/silpa/modules/webfonts/font/Navilu.woff
Binary file not shown.
865 changes: 445 additions & 420 deletions src/silpa/modules/webfonts/fonts.py

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/silpa/modules/webfonts/webfonts.py
Expand Up @@ -61,7 +61,12 @@ def serve(self,font=None):
return "Error!, Font not available"
http_host =self.request.get('HTTP_HOST')
request_uri =self.request.get('REQUEST_URI')
#BUG: fails when server address is like http://domain/silpa/xxxx

silpalogger.debug("Request URI "+request_uri)

if request_uri != None and request_uri.find(get_base_url()) != -1:
http_host += "/"+get_base_url()

font_url = "http://"+http_host+"/modules/webfonts/font/"
css = '''@font-face {
font-family: '$$FONTFAMILY$$';
Expand Down
2 changes: 2 additions & 0 deletions src/silpa/silpa.conf
@@ -1,4 +1,5 @@
# Silpa configuration file

#Copyright 2009-2010
#Santhosh Thottingal <santhosh.thottingal@gmail.com>
#This code is part of Silpa project.
Expand All @@ -25,6 +26,7 @@ SILPA_SITE_LOG_FILDER=/tmp/
#TO disable an action, comment out the line
#An example entry
#SILPA_ACTION.Sort=modules.sort #comment at the end of line is also allowed

SILPA_ACTION.Transliterate=modules.transliterator #transliterator module
#SILPA_ACTION.Normalize=modules.normalizer #transliterator module
SILPA_ACTION.Stem=modules.stemmer #stemmer module for Indian Languages
Expand Down
3 changes: 3 additions & 0 deletions src/silpa/utils/silpautils.py
Expand Up @@ -42,6 +42,9 @@ def get_root_folder():
else:
return os.path.join(os.path.dirname(__file__), root_folder )

def get_base_url():
return load_configuration()["SILPA_BASE_URL"]

def get_modules_list():
conf_dict=load_configuration()
action_dict={}
Expand Down