Patch to display smallcaps for the divineName tag in the latest KJV2006.
It is applied in svn. 

Terry 
Index: src/modules/filters/osishtmlhref.cpp
===================================================================
--- src/modules/filters/osishtmlhref.cpp	(revision 1901)
+++ src/modules/filters/osishtmlhref.cpp	(working copy)
@@ -276,6 +276,32 @@
 			}
 		}
 
+		// divineName  
+		else if (!strcmp(tag.getName(), "divineName")) {
+			SWBuf type = tag.getAttribute("type");
+			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+				if (type == "x-yhwh") {
+					u->inName = true;
+					u->suspendTextPassThru = true;
+				} else {
+					u->inName = false;
+				}
+			} else if (tag.isEndTag()) {
+				if(u->inName ) {
+					char firstChar = *u->lastTextNode.c_str();
+					const char *name = u->lastTextNode.c_str();
+					++name;
+					buf += firstChar;
+					buf += "<font size=\"-1\">";
+					for(int i=0;i<strlen(name);i++)
+						buf += toupper(name[i]);
+					buf += "</font>";
+					u->inName = false;
+					u->suspendTextPassThru = false;
+				}
+			} 
+		}
+
 		// <hi> text highlighting
 		else if (!strcmp(tag.getName(), "hi")) {
 			SWBuf type = tag.getAttribute("type");
Index: include/osishtmlhref.h
===================================================================
--- include/osishtmlhref.h	(revision 1901)
+++ include/osishtmlhref.h	(working copy)
@@ -34,6 +34,7 @@
 	public:
 		bool osisQToTick;
 		bool inBold;
+		bool inName;
 		SWBuf lastTransChange;
 		SWBuf w;
 		SWBuf fn;
_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to