In an article published on the Alternate Takes website, James McDowell discusses a tendency in contemporary American cinema, which he calls "the quirky new wave." Others have named it plainly "indie" filmmaking, but the truth of the matter is that there are a bucketload of recent films which follow a similar formula and have a similar "quirky" tone.
In its most reductive and banal instance, there is the American Beauty formula, which is about a middle-aged man whose life is so dull he has to break free from its numbing grip and find joy in marijuana and plastic bags flowing in the wind. There is always a woman who reaches out and touches the character's heart too, and she is the catalyst. Hey, even Zach Braff's Garden State is in that mould. The idea behind this predicament is one of redemption and finding one's true essence (as irksome as that may sound), one that has been lost by one having to conform to societal norms.
These are usually dumb but sensitive characters, and the narratives usually begin with them in a silent, unacknowledged depression. Some of them find their "truth" in the love of a woman or in some aesthetic endeavor (sometimes both), and the dumber and number the character is in the beginning, the bigger the turnaround. Theorists have been calling works following this formula as belonging to a "movement" called post-postmodernism, in which the loss of identity and purpose of postmodernism is violated in order to find a "beauty" or "truth" that is buried there somehow, reverting back to the idea of "essence" of the modernists.
Postmodernism is very well recognized as the locus of metafiction and metalanguage, and in recent American filmmaking, Charlie Kaufman (Adaptation) and Woody Allen (Deconstructing Harry) have explored the concept with great intelligence and taste. Adaptation was impressive in its full commitment to this project about a screenwriter named Charlie Kaufman trying to adapt a novel called The Orchid Thief, and the movie is about the failure of doing so, and about the process of adaptation itself (also metaphorically) and it treated the movie itself as part of this experiment. The metalanguage gimmick is kind of overplayed and banal by now, and in this case, Kaufman adds something new to the mix.
In Stranger than Fiction, what happens, I suppose, is that writer Zach Helm employs metalanguage not as a gimmick or an aesthetic project, but only as a plot device. His film is in full-fledged post-postmodernist mode, with an almost caricatural depiction of the "numb" character, Harold Crick (Will Ferrell), an IRS employee who works like clockwork, almost literally, and finds his life being narrated by an author (Emma Thompson). Worried, he seeks a literary theory professor (Dustin Hoffman), whose input is limited to trying to find out whether he's in a comedy or a tragedy. His romantic interest is Ana Pascal, a baker (Maggie Gyllenhaal) whom he is auditing. Turns out the author is really writing Crick's story as he lives it, and she's decided he has to die.