[sword-devel] Some Win32 Suggestions
David Trotz
sword-devel@crosswire.org
Mon, 9 Jul 2001 20:10:17 -0700
> Went to apply your patch and noticed that you changed things in
> CreateTextPane to NOT grab the font from the module's .conf file any
> longer... or changed it to look for "Bible Font" instead of "Font"...
> Was wondering what this was about. Maybe we should use the user defined
> font unless the module calls for a specific font. The Font= tag should
> go away soon anyway, since we're moving to the more general Encoding=
> tag. As Chris mentioned, we still have a few issues, like, what if your
> default font SAYS it supports a specific encoding, but doesn't really
> support it completely... Anyway, just wanted to understand your
> thinking before I apply the patch...
Troy,
Is this the section of code you are talking about? It is located in
FormShow of the TForm1 class?
if (!strcmp((*it).second->Type(), "Biblical Texts")) {
textFont = 0;
if ((sit = mainmgr->config->Sections.find((*it).second->Name())) !=
mainmgr->config->Sections.end()) {
if ((eit = (*sit).second.find("Font")) != (*sit).second.end()) {
strcpy(textFont,(char *)(*eit).second.c_str());
}
}
CreateTextPane((*it).second, textFont);
}
I was wondering what this did, it didn't seem to do anything so I assumed it
was obsolete code. Sorry about that, I am still learning the system. By
uncommenting it and only commenting the line "textFont = 0;" it will be like
before. We don't need to set the textFont = 0 any longer since I set the
font style prior to entering this portion of code. I can provide a new patch
if you would like, but the change seems simple enough. Also I had it looking
for "Bible Font" because when I was fooling around with the code I was
planning for multiple fonts for each module type, I did not realize that
this was only being done for biblical texts and the information was stored
in the modules .conf file. As far as changes to the function
TForm1::CreateTextPane I don't believe I made any changes there, did I.
Maybe you were just referring to the above code. I hope this was helpful.
In Christ,
David Trotz